I am trying to customize the material design theme as suggested in this link :
but when I add the following code to my v21/styles file Intellij says that it cannot resolve these symbols.
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light"> <!-- customize the color palette --> <item name="colorPrimary">@color/material_blue_500</item> <item name="colorPrimaryDark">@color/material_blue_700</item> <item name="colorAccent">@color/material_green_A200</item> </style> </resources>
I looked around to see if there are any particular settings that need to be done on the color side but nothing came up. I am using API 21 with support lib v7 on gradle.
@color/material_blue_500 and others are not the resources in android library.
You must define the color resources in
res/values/colors.xml by yourself.
And then you can use it as
Android docs are very vague on this, leading to confusion. To get the predefined colors copy color_material.xml to your local res/values dir. That file is a preserved version as it was during Android-L. The offical version which sits in your local directory:
has been trimmed down to remove those color definitions.