mardi 19 mai 2015

How to Set primary/accent colors for widgets for entire application?

My base theme file for application is following wherein i am setting the primary colors and the accent colors

    <style name="AppTheme" parent="Theme.AppCompat.Light">
        <item name="colorPrimary">@color/primary_yellow</item>
        <item name="colorPrimaryDark">@color/primary_yellow_dark</item>
        <item name="colorAccent">@color/accent</item>
        <item name="colorButtonNormal">@color/primary_orange</item>
</style>

However when i am using the editext and switches as well as the radio buttons i am getting the stock blue color for the widgets when it is pressed or when it's state has changed.All i want is to change to the primary color which is set in my styles.xml.Also as i am targeting devices greater than API16,i want uniform support across all devices upto API22

Any help would be appreciated!

Aucun commentaire:

Enregistrer un commentaire