Change the foreground color of an android application theme

Each application / theme for Android has its own theme color:

HTC Desire Z - Green,

most Samsung designed - yellow, ...

This is the color of the selected list items, buttons of the menu switch, switch, progress indicators, ....

I know how to change these colors individually. But is there a way to change them all by setting one value?

Something like:

<style name="my_theme" parent="@android:style/Theme.Black"> <item name="android:_DEFAULT_BASE_COLOR_1">#XXXXXX</item> </style> 

// EDIT:

So, I am looking for the keyword _DEFAULT_BASE_COLOR_1, where I can set the color for the switch, the selected list item with only one item. Is it possible?

+3
android android-layout
Mar 13 2018-12-12T00:
source share
2 answers

In your manifest in the application tag, specify how:

  android:theme="@style/mytheme" 

Now in res / values ​​you can define a say theme.xml file with content as:

 <resources> <style name="mytheme" parent="@android:style/Theme" > <item name="android:_DEFAULT_BASE_COLOR_1">#XXXXXX</item> <item name="android:windowNoTitle">true</item> ... . </style> </resources> 
-one
Mar 13 '12 at 17:30
source share

try the following:

  <style name="my_theme" parent="@android:style/Theme.Black"> <item name="listChoiceIndicatorSingle">xxxxxxx</item> <item name="radioButtonStyle">xxxxxxx</item> <item name="listChoiceBackgroundIndicator">xxxxxxx</item> <item name="listViewStyle">xxxxxxx</item> <item name="listDivider">xxxxxxx</item> <item name="listSeparatorTextViewStyle">xxxxxxx</item> .... </style> 
0
Mar 13 2018-12-18T00:
source share



All Articles