Can I change the default color (blue) of the attr android:activatedBackgroundIndicator?
I am developing an application for target 18 and for minimun 11.
Thank you
Just go to res/values/styles.edit the xml file to change the color of action bar.
The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a schema associated with the document.
Here is a way to change it on your theme:
Update your theme to apply your custom style on the activatedBackgroundIndicator
attribute (here the parent theme is Holo Light but you can of course change it):
<style name="AppTheme" parent="@android:style/Theme.Holo.Light"> <item name="android:activatedBackgroundIndicator">@drawable/list_activated_background</item> </style>
In your "drawable" resource folder, create the XML file list_activated_background and define your new background indicator, for example:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:drawable="@color/OrangeLight" /> <item android:state_checked="true" android:drawable="@color/OrangeDark" /> <item android:state_pressed="true" android:drawable="@color/OrangeDark" /> <item android:drawable="@android:color/transparent" /> </selector>
Then just be sure you are calling your custom theme in the manifest file with android:theme="@style/AppTheme"
in this case for example.
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