adding some color updating improvements
This commit is contained in:
parent
c5cc2fd57d
commit
9154e48796
3 changed files with 7 additions and 5 deletions
|
@ -6,7 +6,7 @@ buildscript {
|
|||
propMinSdkVersion = 21
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '5.33.32'
|
||||
propVersionName = '5.33.33'
|
||||
kotlin_version = '1.4.30'
|
||||
}
|
||||
|
||||
|
|
|
@ -273,6 +273,8 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc
|
|||
|
||||
fun updatePrimaryColor(primaryColor: Int) {
|
||||
this.primaryColor = primaryColor
|
||||
adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
|
||||
contrastColor = adjustedPrimaryColor.getContrastColor()
|
||||
}
|
||||
|
||||
fun updateBackgroundColor(backgroundColor: Int) {
|
||||
|
|
|
@ -170,8 +170,8 @@ class FastScroller : FrameLayout {
|
|||
hideHandle()
|
||||
}
|
||||
|
||||
fun updatePrimaryColor() {
|
||||
handle!!.background.applyColorFilter(context.getAdjustedPrimaryColor())
|
||||
fun updatePrimaryColor(color: Int = context.getAdjustedPrimaryColor()) {
|
||||
handle!!.background.applyColorFilter(color)
|
||||
updateBubblePrimaryColor()
|
||||
}
|
||||
|
||||
|
@ -181,8 +181,8 @@ class FastScroller : FrameLayout {
|
|||
updateBubbleBackgroundColor()
|
||||
}
|
||||
|
||||
fun updateBubblePrimaryColor() {
|
||||
getBubbleBackgroundDrawable()?.setStroke(resources.displayMetrics.density.toInt(), context.getAdjustedPrimaryColor())
|
||||
fun updateBubblePrimaryColor(color: Int = context.getAdjustedPrimaryColor()) {
|
||||
getBubbleBackgroundDrawable()?.setStroke(resources.displayMetrics.density.toInt(), color)
|
||||
}
|
||||
|
||||
fun updateBubbleTextColor() {
|
||||
|
|
Loading…
Reference in a new issue