Applying a Theme to your Application

If you do not explicitly specify a theme for your UI, Android will use the default theme defined by Many times you will want to use a different system theme (such as Theme.Light) or create your own theme (as described in Style and Theme Resources).

To set your theme in XML, simply specify the desired theme in your AndroidManifest.xml file with the theme attribute. This can be used with the <application> tag (shown here) to specify a default theme for all of your activities, and/or with the <activity> to control the theme of a particular activity.

<!-- AndroidManifest.xml--> 
<manifest xmlns:android=""
    <application android:theme="@android:style/Theme.Dark" >
        <activity class=".Home"

You can also set the theme programmatically, if needed. When doing so, be sure to set the theme before creating any views so that the correct theme is used for all of your user-interface elements. Note that this approach should typically be avoided, especially from the main activities of your application, because the theme you set here may not be used for any animations the system uses to show the activity (which is done before your application starts).

 protected void onCreate(Bundle icicle) {