Helenesh
Helenesh

Reputation: 4359

Custom colours not showing with android.Theme.Material

In my values-v21 folder I have the following style.xml, where I customise Theme.Material:

<resources>
    <style name="AppTheme" parent="android:Theme.Material">
        <item name="colorPrimary">#880E4F</item>
        <item name="colorPrimaryDark">#E91E63</item>
        <item name="colorAccent">#FCE4EC</item>
    </style>
</resources>

However, I cannot see any of those colours when I run my app on Android API 23. I do call the theme in my android manifest: android:theme="@style/AppTheme". I have tried the same with my standard values folder (=>API 21 or smaller, and I have the same problem).

Upvotes: 0

Views: 54

Answers (1)

Aakash
Aakash

Reputation: 161

In folder values-v23 add

<resources>
<style name="AppTheme" parent="android:Theme.Material">
    <item name="android:colorPrimary">#880E4F</item>
    <item name="android:colorPrimaryDark">#E91E63</item>
    <item name="android:colorAccent">#FCE4EC</item>
</style>
</resources>

I hope that works!!

Upvotes: 1

Related Questions