Theme theme is used to set the UI style of the interface, you can set the entire application or an activity's interface style. The following theme are built into the Android SDK and can be categorized by title bar and status bar:
[HTML]View Plaincopyprint?
- android : Theme = " @android: Style/theme.dialog " to display an activity as a modal
- ?android:theme = " @android: Style/theme.notitlebar " does not display the application title bar
- ?android:theme = " @android: Style/theme.notitlebar.fullscreen " does not display the application title bar and full-screen
- ?android:theme = " theme.light " background is white
- ?android:theme = " Theme.Light.NoTitleBar " white background with no title bar
- ?android:theme = " Theme.Light.NoTitleBar.Fullscreen " white background, no title bar, full screen
- ?android:theme = " Theme.black " background black
- ?android:theme = " Theme.Black.NoTitleBar " black background with no title bar
- ?android:theme = " Theme.Black.NoTitleBar.Fullscreen " black background, no title bar, full screen
- ?android:theme = " Theme.wallpaper " with System desktop for application background
- ?android:theme = " Theme.Wallpaper.NoTitleBar " with the system desktop as the application background, and no title bar
- ?android:theme = " Theme.Wallpaper.NoTitleBar.Fullscreen " with System desktop for application background, no title bar, full screen
- ?android:theme = " translucent " translucent
- ?android:theme = " Theme.Translucent.NoTitleBar " Translucent, no title bar
- ?android:theme = " Theme.Translucent.NoTitleBar.Fullscreen " Translucent, no title bar, full screen
- ?android:theme = " Theme.panel "   
- ? Android:theme = "Theme.Light.Panel"
These topics can be applied to the entire application application scope or to an active activity range.
Application Application Range
The theme property is set in the application node in Androidmanifest.xml, and the theme theme applies to the entire application.
<application
android:icon= "@drawable/icon"
android:icon= "@string/app_name"
Android:icon= "@android: Style/theme.black.notitlebar" >
Active Activity Range
Use Java code or set the theme of the active activity in Androidmanifest.xml, which applies only to the current activity.
In the Androidmainifest.xml Setup method:
<activity
Android:name= ". About "
Android:label= "@string/app_name"
Android:theme= "@android: Style/theme.black.notitlebar" >
Use Java code to set it up in the oncreate of the currently active activity:
@Override
public void OnCreate (Bundle savedinstancestate) {
Super.oncreate (savedinstancestate);
SetTheme (Android. R.style.theme_translucent_notitlebar);
Setcontentview (R.layout.main);
}
Android Layout Android:theme use