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" displays an activity as a box mode
- •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, fullscreen
- •android:theme="Theme.wallpaper" with system desktop for application background
- •android:theme="Theme.Wallpaper.NoTitleBar" uses the system desktop as the application background with no title bar
- •android:theme="Theme.Wallpaper.NoTitleBar.Fullscreen" with system desktop for application background, no title bar, fullscreen
- •android:theme="translucent" translucent
- •android:theme="Theme.Translucent.NoTitleBar" translucent, no title bar
- •android:theme="Theme.Translucent.NoTitleBar.Fullscreen" translucent, untitled 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);
}
Reference: http://blog.csdn.net/feng88724/article/details/6457431
Android App interface theme theme how to use