I have a bottom navigation view with 4 icons, one of them being a notification icon.I have to notify when there are new notifications, I am doing that by changing the icon programmatically to
The problem is at runtime the red dot is also grey.
The icons are by default set to grey and on selection it takes primary color of the app (incase no iconTint color is set). If I set the IconTint color to red then the whole image is red instead of just the red dot. I want to show the image as is and not have the background color effect on it. Is there a way to achieve this?
final Menu menu =bottomNavigationView.getMenu();
Handler handler = new Handler(Looper.getMainLooper());
handler.post(new Runnable() {
@Override
public void run() {
MenuItem notificationItem=menu.findItem(R.id.action_notification);
notificationItem.setIcon(R.drawable.notification_icon_with_badge);
}
});
Thanks
P