Changing Navigation Drawer Selected Item Color from default blue

前端 未结 2 745
我在风中等你
我在风中等你 2021-01-11 12:17

Hi and thanks for reading.

I have a problem with my android apps navigation drawer where I cannot change the color from blue - I have went over all the other questi

2条回答
  •  情歌与酒
    2021-01-11 12:53

    First, I would try removing the android:listSelector attribute, as I don't believe it is necessary.

    Next, I would double check you have all these steps:

    • In your application's theme, try adding

    themes.xml

    
    
    • The drawable should refer to a file containing a selector like (like you have)

    activated_background.xml

    
        
        
    
    

    colors.xml

    
        #ff0000
    
    
    • Finally, make sure you are applying the theme in your manifest's application tag using

    AndroidManifest.xml

    android:theme="@style/Theme.mytheme"
    

提交回复
热议问题