mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-04-24 07:07:21 +02:00
Close emoji palette on visibility change
This commit is contained in:
parent
08cc64e029
commit
ecce3793ca
@ -158,7 +158,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||
}
|
||||
MyKeyboard.KEYCODE_EMOJI -> {
|
||||
keyboardView?.vibrateIfNeeded()
|
||||
keyboardView?.openEmojiChooser()
|
||||
keyboardView?.openEmojiPalette()
|
||||
}
|
||||
else -> {
|
||||
var codeChar = code.toChar()
|
||||
|
@ -262,6 +262,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
override fun onVisibilityChanged(changedView: View, visibility: Int) {
|
||||
super.onVisibilityChanged(changedView, visibility)
|
||||
closeClipboardManager()
|
||||
closeEmojiPalette()
|
||||
|
||||
if (visibility == VISIBLE) {
|
||||
mTextColor = context.getProperTextColor()
|
||||
@ -417,7 +418,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
mEmojiPaletteHolder!!.apply {
|
||||
emoji_palette_close.setOnClickListener {
|
||||
vibrateIfNeeded()
|
||||
closeEmojiChooser()
|
||||
closeEmojiPalette()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1392,7 +1393,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
emoji_palette_mode_change.apply {
|
||||
setTextColor(bottomTextColor)
|
||||
setOnClickListener {
|
||||
closeEmojiChooser()
|
||||
closeEmojiPalette()
|
||||
}
|
||||
}
|
||||
emoji_palette_backspace.apply {
|
||||
@ -1423,12 +1424,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
setupEmojis()
|
||||
}
|
||||
|
||||
fun openEmojiChooser() {
|
||||
fun openEmojiPalette() {
|
||||
mEmojiPaletteHolder!!.emoji_palette_holder.beVisible()
|
||||
setupEmojis()
|
||||
}
|
||||
|
||||
private fun closeEmojiChooser() {
|
||||
private fun closeEmojiPalette() {
|
||||
mEmojiPaletteHolder?.apply {
|
||||
emoji_palette_holder?.beGone()
|
||||
mEmojiPaletteHolder?.emojis_list?.scrollToPosition(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user