Fix emoji palette bottom bar colors
This commit is contained in:
parent
0ea9f39ce2
commit
8137b71a32
|
@ -1474,9 +1474,8 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
emojiPaletteLabel.setTextColor(textColor)
|
emojiPaletteLabel.setTextColor(textColor)
|
||||||
|
|
||||||
emojiPaletteBottomBar.background = ColorDrawable(backgroundColor)
|
emojiPaletteBottomBar.background = ColorDrawable(backgroundColor)
|
||||||
val bottomTextColor = textColor.darkenColor()
|
|
||||||
emojiPaletteModeChange.apply {
|
emojiPaletteModeChange.apply {
|
||||||
setTextColor(bottomTextColor)
|
setTextColor(textColor)
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
vibrateIfNeeded()
|
vibrateIfNeeded()
|
||||||
closeEmojiPalette()
|
closeEmojiPalette()
|
||||||
|
@ -1484,7 +1483,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
}
|
}
|
||||||
|
|
||||||
emojiPaletteBackspace.apply {
|
emojiPaletteBackspace.apply {
|
||||||
applyColorFilter(bottomTextColor)
|
applyColorFilter(textColor)
|
||||||
setOnTouchListener { _, event ->
|
setOnTouchListener { _, event ->
|
||||||
when (event.action) {
|
when (event.action) {
|
||||||
MotionEvent.ACTION_DOWN -> {
|
MotionEvent.ACTION_DOWN -> {
|
||||||
|
@ -1560,7 +1559,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
allItems.addAll(emojis.map(EmojisAdapter.Item::Emoji))
|
allItems.addAll(emojis.map(EmojisAdapter.Item::Emoji))
|
||||||
}
|
}
|
||||||
val checkIds = mutableMapOf<Int, String>()
|
val checkIds = mutableMapOf<Int, String>()
|
||||||
val inactiveColor = mTextColor.darkenColor()
|
|
||||||
keyboardViewBinding?.emojiCategoriesStrip?.apply {
|
keyboardViewBinding?.emojiCategoriesStrip?.apply {
|
||||||
weightSum = categories.count().toFloat()
|
weightSum = categories.count().toFloat()
|
||||||
val strip = this
|
val strip = this
|
||||||
|
@ -1577,7 +1575,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
)
|
)
|
||||||
root.setOnClickListener {
|
root.setOnClickListener {
|
||||||
strip.children.filterIsInstance<ImageButton>().forEach {
|
strip.children.filterIsInstance<ImageButton>().forEach {
|
||||||
it.imageTintList = ColorStateList.valueOf(inactiveColor)
|
it.imageTintList = ColorStateList.valueOf(mTextColor)
|
||||||
}
|
}
|
||||||
root.imageTintList = ColorStateList.valueOf(context.getProperPrimaryColor())
|
root.imageTintList = ColorStateList.valueOf(context.getProperPrimaryColor())
|
||||||
keyboardViewBinding?.emojisList?.stopScroll()
|
keyboardViewBinding?.emojisList?.stopScroll()
|
||||||
|
@ -1586,7 +1584,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
root.imageTintList = ColorStateList.valueOf(inactiveColor)
|
root.imageTintList = ColorStateList.valueOf(mTextColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1622,7 +1620,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
if (it.id == id) {
|
if (it.id == id) {
|
||||||
it.imageTintList = ColorStateList.valueOf(context.getProperPrimaryColor())
|
it.imageTintList = ColorStateList.valueOf(context.getProperPrimaryColor())
|
||||||
} else {
|
} else {
|
||||||
it.imageTintList = ColorStateList.valueOf(inactiveColor)
|
it.imageTintList = ColorStateList.valueOf(mTextColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue