Android Theme使用总结

来源:互联网 发布:淘宝内购群 编辑:程序博客网 时间:2024/06/05 15:31
部分资源来自于:http://www.189works.com/article-30428-1.html


1、Theme

它的意思为:

默认状态,即如果theme这里不填任何属性的时候,默认为Theme。

api原文为:

The default system theme. This is the theme used for activities that have not explicitly set their own theme.

You can count on this being a dark background with light text on top, but should try to make no other assumptions about its appearance. In particular, the text inside of widgets using this theme may be completely different, with the widget container being a light color and the text on top of it a dark color.

效果图如下:


2、Theme.NoTitleBar

它的意思为:

背景主题的没有标题栏的样式,默认如果没有设置的话,显示黑背景。

api原文为:

Variant of the default (dark) theme with no title bar.

效果图如下:


3、Theme.NoTitleBar.Fullscreen

它的意思为:

背景主题的没有标题栏且全屏的样式,默认为黑背景。

api原文为:

Variant of the default (dark) theme that has no title bar and fills the entire screen.

效果图如下:


4、Theme.Light

它的意思为:

默认状态下亮背景,与上述黑背景Theme_Black相反。

api原文为:

Theme for a light background with dark text on top. Set your activity to this theme if you would like such an appearance. As with the default theme, you should try to assume little more than that the background will be a light color.

效果图如下:


5、Theme.Light.NoTitleBar

它的意思为:

亮背景主题的没有标题栏的样式,与Theme_Black_NoTitleBar相反。

api原文为:

Variant of the light theme with no title bar.

效果图如下:


6、Theme.Light.NoTitleBar.Fullscreen

它的意思为:

亮背景主题的没有标题栏且全屏显示的样式,与Theme_Black_NoTitleBa_Fullscreenr相反。

api原文为:

Variant of the light theme that has no title bar and fills the entire screen.

效果图如下:


7、Theme.Black

它的意思为:

默认状态下黑背景。

api原文为:

Special variation on the default theme that ensures the background is completely black. This is useful for things like image viewers and media players. If you want the normal (dark background) theme do not use this, use android.com/reference/Android/R.style.html#Theme">Theme.

效果图如下:


8、Theme.Black.NoTitleBar

它的意思为:

黑背景主题的没有标题栏的样式。

api原文为:

Variant of the black theme with no title bar.

效果图如下:


9、Theme.Black.NoTitleBar.Fullscreen

它的意思为:

黑背景主题的没有标题栏且全屏的样式。

api原文为:

Variant of the black theme that has no title bar and fills the entire screen.

效果图如下:


10、Theme.Wallpaper

它的意思为:

使用墙纸做主题,默认状态。

api原文为:

Default theme for windows that want to have the user’s selected wallpaper appear behind them.

效果图如下:


11、Theme.Wallpaper.NoTitleBar

它的意思为:

使用墙纸做主题,且没有标题栏。

api原文为:

Variant of the translucent theme with no title bar.

效果图如下:


12、Theme.Wallpaper.NoTitleBar.Fullscreen

它的意思为:

使用墙纸做主题,且没有标题栏,且全屏显示。

api原文为:

Variant of the translucent theme that has no title bar and fills the entire screen.

效果图如下:


13、Theme.WallpaperSettings

它的意思为:

使用墙纸做主题,默认是使用将上一个界面调暗之后作为主题。

api原文为:

Theme for a wallpaper’s setting activity that is designed to be on top of a dark background.

效果图如下:


14、Theme.Light.WallpaperSettings

它的意思为:

使用墙纸做主题,默认Light状态。

api原文为:

Theme for a wallpaper’s setting activity that is designed to be on top of a light background.

效果图如下:


15、ActiveWallpaperSettings

它的意思为:


api原文为:

Style to apply on top of a wallpaper settings theme when it is being shown on top of the real wallpaper.

效果图如下:


16、PreviewWallpaperSettings

它的意思为:


api原文为:

Style to apply on top of a wallpaper settings theme when it is being shown on top of the real wallpaper.

效果图如下:


17、Theme.Translucent

它的意思为:

半透明状态下的背景,将运行此activity之前的屏幕作为半透明状态作为此activity运行时的样式。

api原文为:

Default theme for translucent activities, that is windows that allow you to see through them to the windows behind. This sets up the translucent flag and appropriate animations for your windows.

效果图如下:


18、Theme.Translucent.NoTitleBar

它的意思为:

半透明状态下没有标题栏的背景,将运行此activity之前的屏幕作为半透明状态作为此activity运行时的样式。

api原文为:

Variant of the translucent theme with no title bar.

效果图如下:


19、Theme.Translucent.NoTitleBar.Fullscreen

它的意思为:

半透明状态下没有标题栏且全屏的背景,将运行此activity之前的屏幕作为半透明状态作为此activity运行时的样式。

api原文为:

Variant of the translucent theme that has no title bar and fills the entire screen.

效果图如下:


20、Theme.NoDisplay

它的意思为:

任何都不显示。比较适用于只是运行了activity,但未显示任何东西。

api原文为:

Default theme for activities that don’t actually display a UI; that is, they finish themselves before being resumed.

效果图如下:


21、Theme.Dialog

它的意思为:

对话框样式 将整个activity变成对话框样式出现。

api原文为:

Default theme for dialog windows and activities, which is used by the android.com/reference/Android/app/Dialog.html">Dialog class. This changes the window to be floating (not fill the entire screen), and puts a frame around its contents. You can set this theme on an activity if you would like to make an activity that looks like a Dialog.

效果图如下:


22、Theme.Dialog.Alert

它的意思为:


api原文为:

Default theme for alert dialog windows, which is used by the {@link android.app.AlertDialog} class. This is basically a dialog but sets the background to empty so it can do two-tone backgrounds.

效果图如下:



23、Theme.Panel

它的意思为:

删除掉所有多余的窗口装饰,在一个空的矩形框中填充内容,作用范围相当于把dialog中的所有元素全部去掉,只是一个空的矩形框,且此为默认的样式。

api原文为:

Default dark theme for panel windows. This removes all extraneous window decorations, so you basically have an empty rectangle in which to place your content. It makes the window floating, with a transparent background, and turns off dimming behind the window.

效果图如下:


24、Theme.Light.Panel

它的意思为:

删除掉所有多余的窗口装饰,在一个空的矩形框中填充内容,作用范围相当于把dialog中的所有元素全部去掉,只是一个空的矩形框,且默认是light的样式。

api原文为:

Default light theme for panel windows. This removes all extraneous window decorations, so you basically have an empty rectangle in which to place your content. It makes the window floating, with a transparent background, and turns off dimming behind the window.

效果图如下:


25、Theme.InputMethod (parent:Theme.Panel)

它的意思为:


api原文为:

Default theme for input methods, which is used by the {@link android.inputmethodservice.InputMethodService} class. this inherits from Theme.NoTitleBar, but makes the background transparent, the window floating and translucent, and ensures that it does not dim the UI behind it. This also configures the window with the standard IME animations and visuals.

效果图如下:


26、Theme.SearchBar (parent:Theme.Panel)

它的意思为:


api原文为:

Theme for the search input bar.

效果图如下:



27、Theme.GlobalSearchBar (parent:Theme.Panel)

它的意思为:


api原文为:

Theme for the search input bar when doing global search. The only difference from non-global search is that we do not dim the background.

效果图如下:


28、Theme.IconMenu

它的意思为:


api原文为:

Menu Themes.

效果图如下:



29、Theme.ExpandedMenu

它的意思为:


api原文为:


效果图如下:


30、Theme.Dialog.AppError

它的意思为:


api原文为:


效果图如下:



31、Theme.Dialog.RecentApplications

它的意思为:


api原文为:

Special theme for the recent apps dialog, to allow customization with overlays.

效果图如下:


32、Theme.Toast (parent:@android:style/Theme.Dialog)

它的意思为:


api原文为:

Default theme for window that looks like a toast.

效果图如下:


原创粉丝点击