Android Custom Textile Blueprint Topic As Well As Color

Posted on 42 views
Google has introduced a novel pattern guideline amongst the unloosen of Android 5.0 (Lollipop) known every bit Material Design, together with amongst this guidelines Google render Material Theme to the android developer. This is a novel user interface. In this post, I volition demo you lot agency to purpose custom cloth pattern topic together with color inwards your application.

Setup Material Theme

First of all, you lot convey to setup cloth pattern topic to your styles.xml file. You tin conduct whatsoever of iii cloth themes according to your wish:
• Theme.Material
• Theme.Material.Light
• Theme.Material.Light.DarkActionBar
Here I convey used Theme.Material.Light.DarkActionBar every bit app theme.

    <style name="AppTheme" parent="Theme.Material.Light.DarkActionBar"> </style>

Add Custom Theme Colors

You convey to exercise a colors.xml file inwards res/values folder to define custom topic colors. After defining topic colors, your colors.xml file seems similar this.
res/values/colors.xml

Look at next image, hither I convey shown pregnant of colorPrimary, colorPrimaryDark, colorAccent, windowBackground, navigationBarColor, statusBarColor, textColorPrimary.

 Google has introduced a novel pattern guideline amongst the unloosen of Android  Android Custom Material Design Theme together with Color

Update Your styles.xml File

Here, I convey added condition bar color, activity bar / app bar color, app background color, navigation bar color, etc. that nosotros defined earlier inwards our colors.xml file. Your styles.xml file seems similar this.
res/values/styles.xml

<resources>      <!-- Base application theme. -->     <style name="AppTheme" parent="Theme.Material.Light.DarkActionBar">         <item name="colorPrimary">@color/colorPrimary</item>         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>         <item name="colorAccent">@color/colorAccent</item>         <item name="android:windowBackground">@color/windowBackground</item>         <item name="android:navigationBarColor">@color/navigationBarColor</item>         <item name="android:statusBarColor">@color/statusBarColor</item>         <item name="android:textColorPrimary">@color/textColorPrimary</item>         <!-- Customize your topic here. -->     </style>  </resources>

Only this much is non virtually the cloth design, it is lot more. Here I but described how to purpose custom cloth pattern topic together with color inwards android application. For to a greater extent than virtually android cloth

READ  What Are Sp Too Dp Inwards Android Too How To Calculate The Resolution Of A Device Inwards Dp