Aghajari / AXEmojiView

an advanced library which adds emoji,sticker,... support to your Android application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can i use open EmojiView without using AXEmojiEditText

alihaider63 opened this issue · comments

Hi @Aghajari @vonox7 @Dor-Naim

Can i use open EmojiView without using AXEmojiEditText?

Thanks

Hi @alihaider63 ,
i won't recommend this at all, but add this TextWatcher to your EditText if you wanted to use any other EditText

        edt.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                final Paint.FontMetrics fontMetrics = edt.getPaint().getFontMetrics();
                if (AXEmojiManager.isInstalled())
                    AXEmojiManager.getInstance().replaceWithImages(edt.getContext(), edt, edt.getText(),
                            fontMetrics.descent - fontMetrics.ascent, fontMetrics);
            }

            @Override
            public void afterTextChanged(Editable s) {}
        });

Hi @Aghajari
Thanks for your reply, actually I want to use EmojiPicker without EditText, in my case I want to use emojis as reactions on chat messages