I have the following styles.xml
:
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Main theme colors -->
<item name="android:colorPrimary">@color/primary</item>
<item name="android:colorPrimaryDark">@color/primary_dark</item>
<item name="android:colorAccent">@color/accent</item>
</style>
</resources>
Where primary
is defined as:
<color name="primary">#9c27b0</color>
However in the preview the actionbar is still black and not deep purple.
When i open the theme editor the actionbar is also deep purple.
Is this a bug in the preview? Or have i done something wrong?
In general how exactly do i use the styles.xml
? Can i also define button's in it?