SuperMario32 SuperMario32 - 1 year ago 116
Android Question

Editing activity theme

I'm trying to edit theme like this:

<style name="MyAppTheme" parent="@android:style/Theme.DeviceDefault.Light.DarkActionBar">
<item name="android:background">@color/colorPrimary</item>

But this colours my whole activity. Instead I want only action bar to be coloured with my custom color. How to achieve this?

I've managed to achieve desired result by using Theme Editor and creating custom theme with it.

Answer Source

Try this

<item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>

and please read this for more info

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download