Aghajari / AXEmojiView

an advanced library which adds emoji,sticker,... support to your Android application.
Apache License 2.0
179 stars 45 forks source link

EmojiPopupLayout with AXSingleEmojiView fails to calculate height #35

Closed dbreskvar closed 2 years ago

dbreskvar commented 2 years ago

When you try to instantiate a view of AXSingleEmojiView it fails if keyboard hasn't been opened yet. This is my code:

binding.emojiPopupLayout.initPopupView(
    AXSingleEmojiView(requireContext()).apply {
        editText = binding.emojiEditText
        onEmojiActionsListener = this
    }
)
binding.emojiPopupLayout.show()

If the keyboard is not open, the height is calculated wrong and the layout has 48dp of height (approximately). After opening the keyboard and calling this function, it works well. I think this issue could also give support to a custom height defined by user and/or make it expandable through the whole view/screen.

Aghajari commented 2 years ago

Hello @dbreskvar , Are you trying to use EmojiPopupLayout as a stand alone view?

dbreskvar commented 2 years ago

@Aghajari I've used it in a bottom sheet dialog but yes, it's technically a standalone view. I'll try it with AXEmojiView 👍

dbreskvar commented 2 years ago

Works perfectly without using the EmojiPopupLayout, thanks 💪