Change Navigation View Item Color Dynamically Android

前端 未结 5 2114
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-03 02:04

I\'d like to build a navigation drawer where each item has a different selection color (the icon tint and text color) as the google play store has:

5条回答
  •  北海茫月
    2020-12-03 02:36

    use app:itemIconTint in your NavigationView for icons and use app:itemTextColor for textColors

    Sample :

    drawable/navigation_text_color :

    
        
        
        
        
    
    

    and layout :

    
    

提交回复
热议问题