The left icon is not displayed
hysapp opened this issue · comments
hyapp commented
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);
}
});
}```
AmirHosseinAghajari commented
Hi, everything looks ok, can you send a screenshot of output or attach the project?