系统自带的Theme:


android以及为我们定义好了一些theme,需要是我们直接可以拿来使用。
常用的Theme通常如下:
 android:theme="@android:style/Theme.Dialog"将一个activity显示为对话框模式
 android:theme="@android:style/Theme.NoTitleBar"不显示应用程序标题栏
 android:theme="@android:style/Theme.NoTitleBar.Fullscreen"不显示应用程序标题栏,并全屏
 android:theme="@android:style/Theme.light"背景为白色
 android:theme="@android:style/Theme.light.NoTitleBar" 白色背景,无标题栏
 android:theme="@android:style/Theme.light.NoTitleBar.Fullscreen" 白色背景,无标题栏,全屏
 android:theme="@android:style/Theme.Black"背景为黑色
 android:theme="@android:style/Theme.Black.NoTitleBar" 黑色背景,无标题栏
 android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" 黑色背景,无标题栏,全屏
  android:theme="@android:style/Theme.Wallpaper"用系统桌面为应用程序背景
  android:theme="@android:style/Theme.Wallpaper.NoTitleBar" 用系统桌面为应用程序背景
,无标题栏
  android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen" 用系统桌面为应用程序背景
,无标题栏,全屏



定义自己的Theme:

Theme的写法和style很相似,也为:
<style name="MyTheme"[parent="PARENT"]>
<item name="[ATTR]">[VALUE]</>
</style>

Theme的属性在Android的文档中并没有介绍,不过我们可以从系统自带的theme中对其进行了解:
一下是我们从android系统本身所带的theme.xml中提取出来的一些常用的属性:
<item name="windowBackground">@android:drawable/screen_background_dark</item>

<item name="windowFrame">@null</item>

<item name="windowNoTitle">false</item>
<item name="windowFullscreen">false</item>
<item name="windowFloating">false</item>

<item name="windowBackground">@android:drawable/screen_background_dark</item>

Android中的主题Theme的更多相关文章

  1. Android中style和theme的区别

    在学习Xamarin android的过程中,最先开始学习的还是熟练掌握android的六大布局-LinearLayout .RelativeLayout.TableLayout.FrameLayou ...

  2. Android中Style和Theme的使用

    Style: Style是View中一些属性的集合,包括height,padding,font color,background等等,Style单独定义在xml文件中,类似与web页面中css的角色, ...

  3. Android中如何利用attrs和styles定义控件

    一直有个问题就是,Android中是如何通过布局文件,就能实现控件效果的不同呢?比如在布局文件中,我设置了一个TextView,给它设置了 textColor,它就能够改变这个TextView的文本的 ...

  4. 【转】说说Android中的style和theme

    最近在做软件从2.3到4.0的改变的一些工作,其中涉及了一些style和theme相关的东西.上网上查了一些东西,这个一并说说.关于android中style和theme的基本使用,这里就不再赘述了, ...

  5. 总结一下Android中主题(Theme)的正确玩法

    在AndroidManifest.xml文件中有<application android:theme="@style/AppTheme">,其中的@style/AppT ...

  6. 【转载】总结一下Android中主题(Theme)的正确玩法

    http://www.cnblogs.com/zhouyou96/p/5323138.html 总结一下Android中主题(Theme)的正确玩法 在AndroidManifest.xml文件中有& ...

  7. Android 样式 (style) 和主题(theme)

    转载:https://gold.xitu.io/post/58441c48c59e0d0056a30bc2 样式和主题 样式是指为 View 或窗口指定外观和格式的属性集合.样式可以指定高度.填充.字 ...

  8. Android 样式和主题(style & theme)

    Android 样式 android中的样式和CSS样式作用相似,都是用于为界面元素定义显示风格,它是一个包含一个或者多个view控件属性的集合.如:需要定义字体的颜色和大小. 在CSS中是这样定义的 ...

  9. 20.(转)Android的样式(Style)和主题(Theme)

    Android上的Style分为了两个方面: 1,Theme是针对窗体级别的,改变窗体样式: 2,Style是针对窗体元素级别的,改变指定控件或者Layout的样式. Android系统的themes ...

随机推荐

  1. css3学习--css3动画详解二(3d效果)

    一.设置3D场景 perspective:800       //浏览器到物体的距离(像素)perspective-origin:50% (x轴) 50% (y轴)    //视点的位置 transf ...

  2. 安装ImageMagick扩展出现configure: error: not found. Please provide a path to MagickWand-config or Wand- config program

    安装ImageMagick扩展报错: checking ImageMagick MagickWand API configuration program... checking Testing /u ...

  3. python 连 mongodb

    这几天在学习Python Web开发,于是做准备做一个博客来练练手,当然,只是练手的,博客界有WordPress这样的好玩意儿,何必还自己造车呢?决定使用Tornado这个框架,然后数据库方面决定顺便 ...

  4. 百度统计js被劫持用来DDOS Github

    今天中午刷着全国最大的信息安全从业人员同性交友社区zone.wooyun.org的时候,忽然浏览器每隔2秒就不断的弹窗: malicious javascript detected on this d ...

  5. jsconsole

    在移动设备或者其他无法启动 chrome developer tools 的时候可以用以下方法进行console 步骤: 1. 进入 http://jsconsole.com 的console画面,在 ...

  6. MySQL协议简单分析

     tcpdump -i eth0 -s0  -l -w - port 3306|strings|grep -i -E 'select|update|insert|delete|set' 

  7. 【HDU2825】Wireless Password (AC自动机+状压DP)

    Wireless Password Time Limit: 1000MS   Memory Limit: 32768KB   64bit IO Format: %I64d & %I64u De ...

  8. Keil C51软件的使用

    进入 Keil C51 后,屏幕如下图所示.几秒钟后出现编辑界 启动Keil C51时的屏幕 进入Keil C51后的编辑界面 简单程序的调试:学习程序设计语言.学习某种程序软件,最好的方法是直接操作 ...

  9. QImage与QPixmap加载图片效果(QImage不能拉伸图片,QPixmap默认拉伸图片)

    QImage与QPixmap加载图片 效果 . 分类: QT开发 qtQtQT PixmapTest::PixmapTest(QWidget *parent) : QDialog(parent) {t ...

  10. [LeetCode#116]Fraction to Recurring Decimal

    Problem: Given two integers representing the numerator and denominator of a fraction, return the fra ...