Search code examples
androidbottomnavigationview

Add Icon after Text Label In Bottom Navigation


I am not able to find a way to add little Red Dot just after bottom navigation label as in image.

Currently it is having Icon + label and I wan to add red dot. Is there any way?

Current

enter image description here

Looking For

enter image description here


Solution

  • This what I have done to achieve what I was looking for. This is the most simpler way I found without using any heavy coding or library.

    Menu menu = navigation.getMenu();
    MenuItem live_one = menu.findItem(R.id.navigation_live_one);
    MenuItem live_two = menu.findItem(R.id.navigation_live_two);
    
    String text = "<font color='white'>Live</font> <font color='red'>&#11044;</font>";
    live_one.setTitle(Html.fromHtml(text));
    live_two.setTitle(Html.fromHtml(text));