Disable a color tint in NavigationView only for specified icons

一笑奈何 提交于 2019-12-04 01:50:41
Robert Banyai
navview.setItemIconTintList(null);

Good luck!

Android Geek

If you want change color of icon on seletion the below is the possible answer:

Change Navigation View Item Color Dynamicly Android

Otherwise you can set

navview.setItemIconTintList(null);

this will give the original colors of icons. and you can use colored and grey icons as per your requirements.

 Menu menuNav = navigationView.getMenu();
 MenuItem menuItem = menuNav.findItem(R.id.nav_subjects);

 // Disable a tint color
 menuItem.setChecked(false);

I hope it answers your question.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!