mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-01-26 16:24:53 +01:00
Avoid null pointer exception
This commit is contained in:
parent
3f06b3516e
commit
888667ded5
@ -1465,10 +1465,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
}
|
||||
|
||||
private fun setupEmojiAdapter(emojis: List<String>) {
|
||||
val emojiItemWidth = context.resources.getDimensionPixelSize(R.dimen.emoji_item_size)
|
||||
val emojiTopBarElevation = context.resources.getDimensionPixelSize(R.dimen.emoji_top_bar_elevation).toFloat()
|
||||
|
||||
mEmojiPaletteHolder?.emojis_list?.apply {
|
||||
val emojiItemWidth = context.resources.getDimensionPixelSize(R.dimen.emoji_item_size)
|
||||
val emojiTopBarElevation = context.resources.getDimensionPixelSize(R.dimen.emoji_top_bar_elevation).toFloat()
|
||||
|
||||
layoutManager = AutoGridLayoutManager(context, emojiItemWidth)
|
||||
adapter = EmojisAdapter(context = context, items = emojis) { emoji ->
|
||||
mOnKeyboardActionListener!!.onText(emoji)
|
||||
|
Loading…
Reference in New Issue
Block a user