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

The left icon is not displayed #18

Open
hysapp opened this issue Aug 19, 2021 · 1 comment
Open

The left icon is not displayed #18

hysapp opened this issue Aug 19, 2021 · 1 comment

Comments

@hysapp
Copy link

hysapp commented Aug 19, 2021

In my app everything works fine but the left icon is not displayed

         private void setupEmojis() {
               mEmojiLayout = findViewById(R.id.emojiPopupLayout);
               AXEmojiPager emojiPager = new AXEmojiPager(this);
               AXSingleEmojiView singleEmojiView = new AXSingleEmojiView(this);
               AXStickerView stickerView = new AXStickerView(this, "stickers", new a18StickerProvider());
               emojiPager.addPage(singleEmojiView, R.drawable.ic_action_emoji);
               emojiPager.addPage(stickerView, R.drawable.ic_action_sticker);
               emojiPager.setSwipeWithFingerEnabled(true);
               emojiPager.setEditText(mMessageEmojiEditText);
               mEmojiLayout.initPopupView(emojiPager);
               emojiPager.setLeftIcon(R.drawable.ic_action_search);
               mEmojiLayout.setPopupAnimationEnabled(true);
               mEmojiLayout.setPopupAnimationDuration(200);
               mEmojiLayout.setSearchViewAnimationEnabled(true);
               mEmojiLayout.setSearchViewAnimationDuration(200);
               mEmojiLayout.setSearchView(new AXEmojiSearchView(this, emojiPager.getPage(0)));
               emojiPager.setOnFooterItemClicked((view, leftIcon) -> {
                   if (leftIcon) mEmojiLayout.showSearchView();
               });

               ImageView emoji = findViewById(R.id.emoji);
               emoji.setOnClickListener(v -> {
                   if (mEmojiLayout.isShowing() && !mEmojiLayout.isKeyboardOpen()) {
                       mEmojiLayout.openKeyboard();
                   } else {
                       mEmojiLayout.show();
                   }
               });

               mEmojiLayout.setPopupListener(new SimplePopupAdapter() {
                   @Override
                   public void onDismiss() {
                       emoji.setImageResource(R.drawable.ic_action_emoji);
                   }

                   @Override
                   public void onShow() {
                       emoji.setImageResource(R.drawable.ic_action_keyboard);
                   }

                   @Override
                   public void onKeyboardOpened(int height) {
                       emoji.setImageResource(R.drawable.ic_action_emoji);
                   }

                   @Override
                   public void onKeyboardClosed() {
                       emoji.setImageResource(mEmojiLayout.isShowing() ? R.drawable.ic_action_keyboard : R.drawable.ic_action_emoji);
                   }
               });
           }```
@Aghajari
Copy link
Owner

Hi, everything looks ok, can you send a screenshot of output or attach the project?

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