zoukankan      html  css  js  c++  java
  • Android 系统自带 Theme(主题)

     系统为我们提供了丰富的系统自带的Theme,当然,你也可以自定义Theme,前提是该Theme必须继承与某个已经存在地Theme,否则编译器会提示错误的。

    1、 应用Theme属性两种方式

          ①、在AndroidManifest.xml文件中在<application/>或者<activity />节点设置android:theme属性.

          ②、直接在代码中调用方法setTheme()设置该Activity的主题,必须得在第一次调用setContentView()前设置。

    常用的系统定义的Theme如下:

    默认:

    Theme

    (1):android:theme="@android:style/Theme.Dialog" 将一个Activity显示为能话框模式 

    Theme_Dialog


    (2):android:theme="@android:style/Theme.NoTitleBar" 不显示应用程序标题栏 

    Theme_NoTitleBar


    (3):android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 不显示应用程序标题栏,并全屏 

    Theme_NoTitleBar_Fullscreen


    (4):android:theme="Theme.Light" 背景为白色 

    Theme_Light


    (5):android:theme="Theme.Light.NoTitleBar" 白色背景并无标题栏 

    Theme_Light_NoTitleBar


    (6):android:theme="Theme.Light.NoTitleBar.Fullscreen" 白色背景,无标题栏,全屏 

    Theme_Light_NoTitleBar_Fullscreen


    (7):android:theme="Theme.Black" 背景黑色 

    Theme_Black


    (8):android:theme="Theme.Black.NoTitleBar" 黑色背景并无标题栏 

    Theme_Black_NoTitleBar


    (9):android:theme="Theme.Black.NoTitleBar.Fullscreen" 黑色背景,无标题栏,全屏 

    Theme_Black_NoTitleBar_Fullscreen


    (10):android:theme="Theme.Wallpaper" 用系统桌面为应用程序背景

    Theme_Wallpaper

     
    (11):android:theme="Theme.Wallpaper.NoTitleBar" 用系统桌面为应用程序背景,且无标题栏 

    Theme_Wallpaper_NoTitleBar


    (12):android:theme="Theme.Wallpaper.NoTitleBar.Fullscreen" 用系统桌面为应用程序背景,无标题栏,全屏 

    Theme_Wallpaper_NoTitleBar_Fullscreen


    (13):android:theme="Translucent"  透明背景

    Theme_Translucent


    (14):android:theme="Theme.Translucent.NoTitleBar"  透明背景并无标题

    Theme_Translucent_NoTitleBar


    (15):android:theme="Theme.Translucent.NoTitleBar.Fullscreen"  透明背景并无标题,全屏

    Theme_Translucent_NoTitleBar_Fullscreen


    (16):android:theme="Theme.Panel"   面板风格显示

    Theme_Panel


    (17):android:theme="Theme.Light.Panel" 平板风格显示

    Theme_Light_Panel

    参考地址:

    http://blog.csdn.net/xiaodongvtion/article/details/7873001

    http://blog.chinaunix.net/uid-24448954-id-2846673.html

  • 相关阅读:
    ParamCount、ParamStr
    写一个可拖动的 TShape 回复 "韦韦" 的问题
    读十六进制文本到 Btye 数组的函数 回复 "峰哥!!!" 的问题
    网站速度优化
    [新功能]新增分类浏览页面
    [CN.Text开发笔记]嵌套Repeater的问题
    中秋祝福
    10 Golden rules for publishing your blog
    HttpCompressionModule 6的一个Bug及使用效果
    [CN.Text开发笔记]OnInit与运行期数据绑定
  • 原文地址:https://www.cnblogs.com/ywtk/p/4135237.html
Copyright © 2011-2022 走看看