Disable a color tint in NavigationView only for specified icons

前端 未结 3 1863
故里飘歌
故里飘歌 2021-02-19 12:17

I need to disable a tint color for some icons in NavigationView because their color define category type. How can I do it?
Below picture shows my problem:
<

3条回答
  •  滥情空心
    2021-02-19 12:52

     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.

提交回复
热议问题