Android Resource Intro Theme (Theme)

Android Theme (Source Google Images)

I hope you understand the concept of style, so now let’s try to understand what that scene.

<application android:theme="@style/CustomFontStyle">

The theme is nothing but Android style applied to the overall activity or application instead of individual display.

<activity android:theme="@style/CustomFontStyle">

Thus, when the force is applied as a theme, every View in Activity or application will apply every style properties that it supports.

<style name="CustomTheme" parent="android:Theme.Light">
   ...
</style>

But if you want a theme that is applied only on one Activity in your application, then add  android: theme only attribute to the <activity> tag only.

<resource>
   <style name="AppTheme" parent="android:Theme.Material">    
      <item name ="android:color/primary">@color/primary</item>
      <item name ="android:color/primaryk">@color/prima</item>
      <item name ="android:colorAcent/primary">@color/accent</item>
   </style>
<resource>
Example Application of Theme on Android

Source: MasterAndroid (App)

Post Author: Study