Change of homeAsUpIndicator icon in ActionbarSherlock does not effect in ICS?
<?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!
Related videos on Youtube
RajaReddy PolamReddy
I love programming. I mostly code in "Android", "ActionScript", "Adobe Flash", Adobe AS3, iOS, Objective-C . My App.. Image Crop Current applications BingoBash and Slots Bash SOreadytohelp
Updated on June 04, 2022Comments
-
RajaReddy PolamReddy almost 2 years
I try to change the
homeAsUpIndicator
icon in theActionBar
. I useActionBarSherlock
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..