Ahmed Aljazwi
Ahmed Aljazwi

Reputation: 21

How to change android material theme?

I am having a problem with changing the material theme.

I work on android overlay (theming) and everything works great like replacing icons and fonts colors except for the inside material its the gray green lollipop stuff.

Anyone having any idea how I should do this?

Upvotes: 2

Views: 1193

Answers (1)

John Cordeiro
John Cordeiro

Reputation: 2191

If you are using AppCompat Theme for compatibility, you should create a theme like this:

<style name="AppTheme" parent="Theme.AppCompat.Light">
    <item name="colorPrimary">@color/base</item>
    <item name="colorPrimaryDark">@color/base_status</item>
    <item name="colorAccent">@color/base</item>

    <item name="android:textColorPrimary">@android:color/white</item>
    <item name="android:colorForeground">@android:color/white</item>
    <item name="android:windowBackground">@android:color/white</item>
</style>

Based on:

enter image description here

and finally set to your Application tag or to a specific Activity:

<activity
    android:name="com.app.YourActivity"
    android:theme="@style/AppTheme">
</activity>

Upvotes: 1

Related Questions