Closed Superpengun closed 1 year ago
You need to call setUp of EmojiView
You need to call setUp of EmojiView
the second pic is the setUp method of EmojiView,crash occured in“findViewById”
You're doing something wrong then. I'm using EmojiView within a dialog, can you reproduce this in the sample app?
You're doing something wrong then. I'm using EmojiView within a dialog, can you reproduce this in the sample app?
in your demo,it's ok when init it in a dialogfragment;but it not work well in a dialog in a service and the it's context is using the displaycontext(for example ,Display 1 use Context.createDisplayContext(1) as context)
Probably a limitation of the display context then, we need a proper context with a proper window.
1.8 version
I try to add the emojiview to another view running as a dialog on a service(not activity),without a edittext; Referring to the example"EmojisActivity",put "com.vanniktech.emoji.EmojiView" to xml,and use "setUp(view,null,null,null)"to init the view; If the params "view" is the emojiview's praent view(my custom view),the application will repeat"at android.view.View.inflate(View.java:26707)"
It is same if i put the dialog's decorView as the param; And if i inflate a Layout and set it as the dialog's contentview,and then code the emojiview like "mEmojiView = currentInputView?.findViewById(R.id.emoji_view)" the currentinputview is the layout; the application will crash at "EmojiView :findViewById(R.id.emojiViewPager)" it report a nullpointer crash
The rootview which emojiview need some potential condition?