0

i'm using Sliding menu by jfeinstein10, here i have succesfully set the custom navigation icon for sliding menu.

i have done it in my style.xml like

<style name="AppBaseTheme" parent="@style/Theme.Sherlock.Light">
    <!-- API 14 theme customizations can go here. -->
        <item name="homeAsUpIndicator">@drawable/ic_navigation_drawer</item>

</style>

Now, if i open a new activity, there also i'm seeing the custom home indicator icon & i'm not getting the default back arrow in the new activity which i open from sliding menu.

For eg: in Gmail, by default if we slide a navigation icon will be present in all mail view. But if we go to compose new email the homeupindicator icon changes, how to do?

Naruto
  • 9,476
  • 37
  • 118
  • 201

1 Answers1

1

Here is the solution

A detailed explanation of changing the actionbar homeasupindicator

Change the actionbar homeAsUpIndicator Programamtically

This is what i did to acheive the behavior. I inherited the base theme and created a new theme to use it as a theme for the specific activity.

<style name="CustomActivityTheme" parent="AppTheme">
    <item name="android:homeAsUpIndicator">@drawable/custom_home_as_up_icon</item>
</style>

and in the android manifest i made the activity theme as the above.

<activity
        android:name="com.example.CustomActivity"
        android:theme="@style/CustomActivityTheme" >
</activity>

works great. TRy like this for all activities it works like charm.

Community
  • 1
  • 1
Naruto
  • 9,476
  • 37
  • 118
  • 201
  • help plz . i DONE EXACTLY AS YOU SAID BUT Nothing happened – MGDroid Sep 25 '14 at 11:09
  • What is the result you are getting, have u included style in ur manifest file properly?, have u created style properly? – Naruto Sep 26 '14 at 04:45
  • ya i have done it . there is a little space but no icon is showing. – MGDroid Sep 26 '14 at 05:58
  • Hello, can u see this post, it explains clearly, http://www.feelzdroid.com/2014/10/programmatically-change-android-action-bar-homeAsUpIndicator-navigation-icon.html. for sure u will understand, if you face any issues let me know – Naruto Oct 03 '14 at 16:35