Applying Custom Themes In Your Application

This example shows how you can apply your own theme which is inherited from built-in themes on your application/activity in android.


1.) Create a new project by File-> New -> Android Project name it ApplyCustomTheme.

2.) Write following into main.xml:




3.) Write following into your values/styles.xml:



4.) Write following into your manifest file:


5.) Run for output.


1.) Create a project named ApplyCustomTheme and set the information as stated in the image.

Build Target: Android 4.4
Application Name: ApplyCustomTheme
Package Name: com.example.ApplyCustomTheme
Activity Name: ApplyCustomThemeActivity


2.) Open file and write following code there:




3.) Compile and build the project.