I change the theme from the design section from the dropdown menu like material dark, holo, etc. But when I run the app on the device the app doesn't show any changes, hence I understood the code does not change so what is the code I need to write in style section to change the theme?
How do I change the theme of my app in android studio?
4.7k views Asked by Shrey Makwana At
4
There are 4 answers
0
On
In res/values/styles.xml you can add following code to change theme:
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowNoTitle">true</item>
<item name="android:colorPrimary">@color/colorPrimary</item>
<item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/colorPrimaryDark</item>
<item name="android:colorControlActivated">@color/colorPrimaryDark</item>
<item name="android:colorControlHighlight">@color/colorPrimary</item>
<item name="android:colorControlNormal">@color/colorPrimary</item>
<item name="android:windowBackground">@color/colorBackground</item>
</style>
</resources>
you can change theme by modifying parent
attribute