阿神2017-04-18 09:54:33
By default you should use style.xml
中的AppTheme
主题(这个可以在AndroidManifest.xml
as seen in). Assuming that is the case, then you can change the color of the drawer button by:
Enterstyle.xml
;
Add an inheritance from Widget.AppCompat.DrawerArrowToggle
的style,这里叫做"DrawerArrowStyle"。在里面加上你想要的颜色,这里比如@color/colorBlue
;
Add a line named drawerArrowStyle to style "AppTheme".
In this way, style has the following two items:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
...
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
</style>
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="color">@color/colorBlue</item>
</style>
Run it again and you will see the result.