The color of my android application is black. I wish to change it to other color. What is the easiest way to do it? I have tried to make a theme from this link
When the application is opened, I could see that the action bar has changed the color from black to other color but in about 3 seconds, there is a message: Unfortunately, .... has stopped. I wish to use an easier way to may it. Any help is greatly appreciated.
To apply the theme to all activities, change the style.xml like this:
<style name="AppTheme" parent="android:Theme.Holo.Light">
<item name="android:actionBarStyle">@style/ActionBarTheme</item>
</style>
<style name="ActionBarTheme" parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/action_bar</item>
</style>
And in colours.xml, use:
<color name="action_bar">#BA0000</color>
And in the manifest:
<application
android:theme="@style/AppTheme" >
if you want change the color of ActionBar
just do this:
ActionBar bar = getActionBar();
bar.setBackgroundDrawable(new ColorDrawable("COLOR"));
see the following link for more info