How can i change the color of animated ActionBarDrawerToggle icons in ActionBar, using AppCompat-v7 (v21)?
I tried this, but doesn't work. Thanks.
myActionBarActivity.java
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mLeftDrawer = (LinearLayout) findViewById(R.id.left_drawer);
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
R.string.drawer_open, R.string.drawer_close)
values/styles.xml
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/black</item>
</style>
UPDATE: solved, there was this entry <item name="actionBarWidgetTheme">
in my theme which probably overlapped <item name="drawerArrowStyle">
. I removed it and now all works.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…