继android Theme使用总结之后,我总结了一下level 11的样式。方法与android Theme使用总结一样,都是将theme写在AndroidManifest.xml中定义。
以下是level 11的theme,截图我使用的是3.0的模拟器:
1、Theme_Holo
意思为:New Honeycomb全屏显示样式,默认是黑背景,
api原文:
New Honeycomb holographic theme. Dark version. The widgets in the holographic theme are translucent on their brackground, so applications must ensure that any background they use with this theme is itself dark; otherwise, it will be difficult to see the widgets. The new UI style also includes a full action bar by default. Styles used by the Holo theme are named using the convention Type.Holo.Etc. (For example, Widget.Holo.Button, TextAppearance.Holo.Widget.PopupMenu.Large.) Specific resources used by Holo are named using the convention @type/foo_bar_baz_holo with trailing _dark or _light specifiers if they are not shared between both light and dark versions of the theme.
效果图如下:
1.1、Theme_Holo_Dialog
意思为:将activity显示成对话框的样式,
api原文:
Dialog themes for Holo Holo theme for dialog windows and activities, which is used by theDialog
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. This is the default Dialog theme for applications targeting Honeycomb or newer.
效果图如下:需自定义大小,否则像下图一样View显示不全
1.1.1、Theme_Holo_Dialog_MinWidth
意思为:将activity显示成对话框的样式,显示最小状态时,
api原文:
Variation of Theme.Holo.Dialog that has a nice minumum width for a regular dialog.
效果图如下:
1.1.2、Theme_Holo_DialogWhenLarge
意思为:将activity显示成对话框的样式,显示最大状态时,
api原文:
Theme for a window that will be displayed either full-screen on smaller screens (small, normal) or as a dialog on larger screens (large, xlarge).
效果图如下:
1.1.3、Theme_Holo_DialogWhenLarge_NoActionBar
意思为:将activity显示成对话框的样式,显示最大状态时,且没有action bar
api原文:
Theme for a window without a title bar that will be displayed either full-screen on smaller screens (small, normal) or as a dialog on larger screens (large, xlarge).
效果图如下:
1.1.4、Theme_Holo_Dialog_NoActionBar
意思为:将activity显示成对话框的样式,且没有action bar,默认状态
api原文:
Variation of Theme.Holo.Dialog that does not include a title bar.
效果图如下:需自定义大小,否则像下图一样View显示不全
1.1.5、Theme_Holo_Dialog_NoActionBar_MinWidth
意思为:将activity显示成对话框的样式,且没有action bar,显示最小状态时
api原文:
Variation of Theme.Holo.Dialog.NoActionVar that has a nice minumum width for a regular dialog.
效果图如下:
1.2、Theme_Holo_InputMethod
意思为:
api原文:
Default theme for modern holo style input methods, which is used by the InputMethodService
class. this inherits from Theme.Panel, but sets up IME appropriate animations and a few custom attributes.
效果图如下:类似于panel;需自定义大小,否则像下图一样View显示不全
1.3、Theme_Holo_NoActionBar
意思为: 默认状态下,没有action bar的样式。
api原文:
Variant of the holographic (dark) theme with no action bar.
效果图如下:
1.3.1、Theme_Holo_NoActionBar_Fullscreen
意思为: 默认状态下,没有action bar且全屏的样式。 (这里我很不解。为什么与上一个显示效果一样。难道说Google认为现在的状态就是全屏了?那么下面的时间什么的怎么都在?)
api原文:
Variant of the holographic (dark) theme that has no title bar and fills the entire screen
效果图如下:
1.4、Theme_Holo_Wallpaper
意思为: 使用墙纸做为样式背景,默认状态下。
api原文:
Default holographic (dark) for windows that want to have the user’s selected wallpaper appear behind them.
效果图如下:
1.4.1、Theme_Holo_Wallpaper_NoActionBar
意思为: 使用墙纸做为样式背景,且没有action bar。
api原文:
Variant of the holographic (dark) theme with no title bar
效果图如下:
1.5、Theme_Holo_Panel
意思为: 默认将一个activity显示成一个对话框样式,区别于对话框,这个没有外边框,没有任何样式元素只有一个空的矩形框。
api原文:
Default holo 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.
效果图如下:需自定义大小,否则像下图一样View显示不全
2、Theme_Holo_Light
意思为: 默认样式,区别于黑背景,这个属于亮背景。
api原文:
New Honeycomb holographic theme. Light version. The widgets in the holographic theme are translucent on their brackground, so applications must ensure that any background they use with this theme is itself light; otherwise, it will be difficult to see the widgets. The new UI style also includes a full action bar by default.
效果图如下:
2.1、Theme_Holo_Light_Dialog
意思为: 默认将一个activity显示成一个对话框样式,区别于黑背景,这个属于亮背景。
api原文:
Light holo dialog themes Holo light theme for dialog windows and activities, which is used by theDialog
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. This is the default Dialog theme for applications targeting Honeycomb or newer.
效果图如下:需自定义大小,否则像下图一样View显示不全
2.1.1、Theme_Holo_Light_Dialog_MinWidth
意思为: 默认将一个activity显示成一个对话框样式,区别于黑背景,这个属于亮背景,显示最小状态时。
api原文:
Variation of Theme.Holo.Light.Dialog that has a nice minumum width for a regular dialog.
效果图如下:
2.1.2、Theme_Holo_Light_DialogWhenLarge
意思为: 默认将一个activity显示成一个对话框样式,区别于黑背景,这个属于亮背景,显示最大状态时。
api原文:
Theme for a window that will be displayed either full-screen on smaller screens (small, normal) or as a dialog on larger screens (large, xlarge).
效果图如下:
2.1.3、Theme_Holo_Light_DialogWhenLarge_NoActionBar
意思为: 默认将一个activity显示成一个对话框样式,区别于黑背景,这个属于亮背景,显示最大状态,且没有action bar时。
api原文:
Theme for a window without an action bar that will be displayed either full-screen on smaller screens (small, normal) or as a dialog on larger screens (large, xlarge).
效果图如下:
2.1.4、Theme_Holo_Light_Dialog_NoActionBar
意思为: 默认将一个activity显示成一个对话框样式,区别于黑背景,这个属于亮背景,且没有action bar时。
api原文:
Theme for a window without an action bar that will be displayed either full-screen on smaller screens (small, normal) or as a dialog on larger screens (large, xlarge).
效果图如下:需自定义大小,否则像下图一样View显示不全
2.1.5、Theme_Holo_Light_Dialog_NoActionBar_MinWidth
意思为: 默认将一个activity显示成一个对话框样式,区别于黑背景,这个属于亮背景,且没有action bar时,显示最小状态时。
api原文:
Variation of Theme.Holo.Light.Dialog that has a nice minumum width for a regular dialog.
效果图如下:
2.2、Theme_Holo_Light_Panel
意思为: 默认将一个activity显示成一个对话框样式,区别于对话框,这个没有外边框,没有任何样式元素只有一个空的矩形框,区别于黑背景,这个属于亮背景。
api原文:
Default holo 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.
效果图如下:需自定义大小,否则像下图一样View显示不全
3、Theme_NoTitleBar_OverlayActionModes
意思为:( 这里我按照api翻译为:没有标题栏,但状态栏将覆盖应用内容,而不是将应用内容挤下去为自己腾出空间。)不太明白哪里会用到此主题。留待以后去解决
api原文:
No title bar, but Action Mode bars will overlay application content instead of pushing it down to make room.
效果图如下:
4、Theme_WithActionBar
意思为:显示action Bar的主题样式
api原文:
Default theme with an Action Bar.
效果图如下:
总结,Honeycomb下的action bar相当于level 11以下的title bar,不同的是,Honeycomb在对话框样式时会比level 11以下的title bar多一个横线,起码现在在模拟器上看来是多了一条横线。
转自:http://henzil.easymorse.com/?p=411