Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can i use open EmojiView without using AXEmojiEditText #29

Open
alihaider63 opened this issue Apr 21, 2022 · 2 comments
Open

Can i use open EmojiView without using AXEmojiEditText #29

alihaider63 opened this issue Apr 21, 2022 · 2 comments

Comments

@alihaider63
Copy link

Hi @Aghajari @vonox7 @Dor-Naim

Can i use open EmojiView without using AXEmojiEditText?

Thanks

@Aghajari
Copy link
Owner

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) {}
        });

@alihaider63
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants