zoukankan      html  css  js  c++  java
  • Android预定义样式

    对于能够显示文字的控件(如TextView EditText RadioButton Button CheckBox Chronometer等等),你有时需要控制字体的大小。Android平台定义了三种字体大小。

    "?android:attr/textAppearanceLarge"

    "?android:attr/textAppearanceMedium"

    "?android:attr/textAppearanceSmall"

    使用方法为:

    android:textAppearance="?android:attr/textAppearanceLarge" 
    android:textAppearance="?android:attr/textAppearanceMedium" 
    android:textAppearance="?android:attr/textAppearanceSmall"

    style="?android:attr/textAppearanceLarge" 
    style="?android:attr/textAppearanceMedium" 
    style="?android:attr/textAppearanceSmall"

    字体颜色

    android:textColor="?android:attr/textColorPrimary" 
    android:textColor="?android:attr/textColorSecondary" 
    android:textColor="?android:attr/textColorTertiary" 
    android:textColor="?android:attr/textColorPrimaryInverse" 
    android:textColor="?android:attr/textColorSecondaryInverse"

    ProgressBar

    style="?android:attr/progressBarStyleHorizontal" 
    style="?android:attr/progressBarStyleLarge" 
    style="?android:attr/progressBarStyleSmall" 
    style="?android:attr/progressBarStyleSmallTitle"

    分隔符

    横向:

    <View android:layout_width="fill_parent" 
          android:layout_height="1dip" 
          android:background="?android:attr/listDivider" />

    纵向:

    <View android:layout_width="1dip" 
          android:layout_height="fill_parent" 
          android:background="?android:attr/listDivider" />

    CheckBox

    style="?android:attr/starStyle"

    类似标题栏效果的TextView

    style="?android:attr/listSeparatorTextViewStyle"

    其它有用的样式

    android:layout_height="?android:attr/listPreferredItemHeight"

    android:paddingRight="?android:attr/scrollbarSize"

    style="?android:attr/windowTitleBackgroundStyle"

    style="?android:attr/windowTitleStyle"

    android:layout_height="?android:attr/windowTitleSize"

    android:background="?android:attr/windowBackground"

    转自:http://apps.hi.baidu.com/share/detail/31068312

  • 相关阅读:
    java的内存分配
    Java多线程sleep和wait的区别
    java static关键字
    在自己电脑创建svn服务、导入和导出项目
    开发工具下载地址
    svn操作步骤
    java的反射
    正数|非负数|正整数正小数和0 |金额正则表达式
    springBatch文件批处理
    IE浏览器问题之清除缓存!!!
  • 原文地址:https://www.cnblogs.com/suizhikuo/p/3099999.html
Copyright © 2011-2022 走看看