-
Notifications
You must be signed in to change notification settings - Fork 45
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
Emojis icon sizes Not Working in CustomRecycleAdapter #5
Comments
Hi @pcshedeur , |
Hi @pcshedeur , Warning: Main sample has been updated. |
Thank you. The size is working now. Please do you have any example implementation for a custom RecyclerAdapter. @Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
ObjectChats messages = messageList.get(position);
String message = messages.getMessage();
final int res;
int emoji_counter = AXEmojiUtils.getEmojisCount(message);
if(emoji_counter == 1) {
res = R.dimen.emoji_size_single_emoji;
}
else if(emoji_counter < 1) {
res = R.dimen.emoji_size_default;
}
else {
res = R.dimen.emoji_size_multiple_emoji;
}
if (messages.getSender().equals("1")) {
holder.messageSelf.setBackgroundResource(R.drawable.chat_send);
holder.messageSelf.setEmojiSizeRes(res, false);
holder.messageSelf.setText(message);
}
else {
holder.messageOther.setBackgroundResource(R.drawable.chat_receive);
holder.messageOther.setEmojiSizeRes(res, false);
holder.messageOther.setText(message);
}
TimeAgo t = new TimeAgo(context);
String time = t.timeAgo(Long.parseLong(messages.getDate()));
holder.date.setText(time);
} With this, when the view is first rendered, none of the emojis appear. But when I scroll up and down, the emojis appear as expect after. |
Hi @pcshedeur , I've handle this for EmojiImageView in lib. |
Done! Check out AXEmojiView v1.2.2 |
Thank you. Works perfectly. Your response time is impressive. |
I have gone through so many libraries and this is the first one I was able to implement successfully so thank you. Just a little challenge. I am unable to increase the icon size in for emojis inside a custom recycle adapter.
I tried
holder.textView.setEmojiSize(40, true);
but the icons remain the same size. Please any suggestion?The text was updated successfully, but these errors were encountered: