Yes you can do it. I also did it .
First select the MenuItem for which you want to change the color
Menu m = navView.getMenu(); MenuItem menuItem = m.findItem(your_menu_id);
then apply spannable with your color
SpannableString s = new SpannableString(menuItem.getTitle()); s.setSpan(new ForegroundColorSpan(Color.your_color), 0, s.length(), 0); menuItem.setTitle(s);
thats it ..
Now the code below is for your 2nd solution, dynamically changing the color of the text in the menu.
navView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(MenuItem menuItem) { SpannableString s = new SpannableString(menuItem.getTitle()); s.setSpan(new ForegroundColorSpan(Color.RED), 0, s.length(), 0); menuItem.setTitle(s); return false; } });
Moinkhan
source share