I want to use a hamburger icon on the right side of my action bar. But it's showing an arrow sign. I have included Library AppCompatV7 and extending my class from Activity. Can someOne please give the solution. I have tried many solutions but none is working.
Asked
Active
Viewed 2,637 times
1 Answers
2
Open Android Manifest, check what theme you are using. I was using AppTheme for my main activity
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".FrontPageActivity"
android:label="@string/app_name">
</activity>
2) Open res/values/styles, make sure your theme includes the attribu "drawerArrowStyle", then create a new style for that to change the value for "spinBars" to true.
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
</style>
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/white</item>
</style>
...it took me a while to piece that one together.

Russell Elfenbein
- 563
- 3
- 6
-
Thanks for your reply @Russell... I have updated my styles.xml now.. But my app gets crashed when i add that DrawerArrowStyle. Any idea? – Naila Mar 20 '16 at 16:04
-
please update your questions with your layout, style, main activity and crash result. – Russell Elfenbein Mar 20 '16 at 22:10