pass in the color value for the attribute instead of looking up again
This commit is contained in:
parent
c035745b94
commit
f0cf0f4106
1 changed files with 2 additions and 5 deletions
|
@ -38,12 +38,9 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
|||
|
||||
fun setup(activity: ReaderActivity) {
|
||||
presenter = activity.presenter
|
||||
val primary = ColorUtils.setAlphaComponent(
|
||||
activity.getResourceColor(
|
||||
R.attr.colorSecondary
|
||||
), 200
|
||||
)
|
||||
val fullPrimary = activity.getResourceColor(R.attr.colorSecondary)
|
||||
val primary = ColorUtils.setAlphaComponent( fullPrimary, 200)
|
||||
|
||||
sheetBehavior = BottomSheetBehavior.from(this)
|
||||
chapters_button.setOnClickListener {
|
||||
if (sheetBehavior?.state == BottomSheetBehavior.STATE_EXPANDED) sheetBehavior?.state =
|
||||
|
|
Reference in a new issue