I try to change the homeAsUpIndicator
icon in the ActionBar
. I use ActionBarSherlock
to be compatible with older Android Versions. I set a specific theme to my Activity when the App runs on a device with Older verions of ICS and ICS it shows different colors.
This is the style i am using
<style name="Theme.PM" parent="@style/Theme.Sherlock.Light">
<item name="android:homeAsUpIndicator">@drawable/back_sign</item>
<item name="homeAsUpIndicator">@drawable/back_sign</item>
</style>
like this below image's For ICS see that home as up indicator look like black color.
For Older versions of ICS see that home as up indicator look like white color.
i am using same image for both versions, but it's looking different on ICS. how to solve this problem..
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="CustomStyleUpAsHome" parent="Theme.Sherlock.Light">
<item name="android:actionBarStyle">@style/CustomActionBarUpAsHome</item>
<item name="android:homeAsUpIndicator">@drawable/arrow_home</item>
<item name="homeAsUpIndicator">@drawable/arrow_home</item>
</style>
<style name="CustomActionBarUpAsHome" parent="CustomActionBar">
<item name="android:displayOptions">homeAsUp|useLogo|showHome</item>
<item name="displayOptions">homeAsUp|useLogo|showHome</item>
</style>
</resources>
<activity
android:name=".activity.Activity"
android:screenOrientation="portrait"
android:theme="@style/CustomStyleUpAsHome">
</activity>
This code works great. Try to do something like that. May be it will help you.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With