欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 运维知识 > Android >内容正文

Android

Android系统自带样式(@android:style/)

发布时间:2025/1/21 Android 52 豆豆
生活随笔 收集整理的这篇文章主要介绍了 Android系统自带样式(@android:style/) 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

AndroidManifest.xml文件的activity中配置   (API 18中Manifest文件中,<activity />要有android:theme="@android:style/Theme",否则报错

1android:theme="@android:style/Theme"

默认状态,即如果theme这里不填任何属性的时候,默认为Theme(最常用)

2android:theme="@android:style/Theme.NoDisplay"

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

3android:theme="@android:style/Theme.NoTitleBar“

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

4android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

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

5android:theme="@android:style/Theme.Black"

默认状态下黑背景

6android:theme="@android:style/Theme.Black.NoTitleBar"

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

7android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"

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

8android:theme="@android:style/Theme.Light"

默认状态下亮背景,与上述黑背景Theme.Black相反

9android:theme="@android:style/Theme.Light.NoTitleBar"

亮背景主题的没有标题栏的样式,与Theme.Black.NoTitleBar相反

10android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen"

亮背景主题的没有标题栏且全屏显示的样式,与Theme.Black.NoTitleBa.Fullscreenr相反

11android:theme="@android:style/Theme.Dialog"

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

12android:theme="@android:style/Theme.InputMethod"

Windowanimations that are applied to input method overlay windows

13android:theme="@android:style/Theme.Panel"

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

14android:theme="@android:style/Theme.Light.Panel"

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

15android:theme="@android:style/Theme.Wallpaper"

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

16android:theme="@android:style/Theme.WallpaperSettings"

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

17android:theme="@android:style/Theme.Light.WallpaperSettings"

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

18android:theme="@android:style/Theme.Wallpaper.NoTitleBar"

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

19android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"

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

20android:theme="@android:style/Theme.Translucent"

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

21android:theme="@android:style/Theme.Translucent.NoTitleBar"

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

22android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"

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

 

总结

以上是生活随笔为你收集整理的Android系统自带样式(@android:style/)的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。