mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 05:05:06 +01:00
pass in the color value for the attribute instead of looking up again
This commit is contained in:
parent
c035745b94
commit
f0cf0f4106
@ -38,12 +38,9 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
|||||||
|
|
||||||
fun setup(activity: ReaderActivity) {
|
fun setup(activity: ReaderActivity) {
|
||||||
presenter = activity.presenter
|
presenter = activity.presenter
|
||||||
val primary = ColorUtils.setAlphaComponent(
|
|
||||||
activity.getResourceColor(
|
|
||||||
R.attr.colorSecondary
|
|
||||||
), 200
|
|
||||||
)
|
|
||||||
val fullPrimary = activity.getResourceColor(R.attr.colorSecondary)
|
val fullPrimary = activity.getResourceColor(R.attr.colorSecondary)
|
||||||
|
val primary = ColorUtils.setAlphaComponent( fullPrimary, 200)
|
||||||
|
|
||||||
sheetBehavior = BottomSheetBehavior.from(this)
|
sheetBehavior = BottomSheetBehavior.from(this)
|
||||||
chapters_button.setOnClickListener {
|
chapters_button.setOnClickListener {
|
||||||
if (sheetBehavior?.state == BottomSheetBehavior.STATE_EXPANDED) sheetBehavior?.state =
|
if (sheetBehavior?.state == BottomSheetBehavior.STATE_EXPANDED) sheetBehavior?.state =
|
||||||
|
Loading…
Reference in New Issue
Block a user