How To Use Build-in Android Themes In Your Application

This example shows how you can apply built-in themes in your application.

Algorithm:

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

2.) Write following into main.xml:

 

 

3.) Write following into your manifest file:

 

4.) Run for output.

Steps:

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

Build Target: Android 4.4
Application Name: BuiltInThemeExample
Package Name: com.example.BuiltInThemeExample
Activity Name: BuiltInThemeExampleActivity

UsingCustomTheme1

2.) Open BuiltInThemeExampleActivity.java file and write following code there:

 

 

3.) Compile and build the project.

Output

UsingCustomTheme2