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"

    分隔符
    横向:

    纵向:

    CheckBox
    style="?android:attr/starStyle"

    类似标题栏效果的TextView
    style="?android:attr/listSeparatorTextViewStyle"

    其它有用的样式
    android:layout_height="?android:attr/listPreferredItemHeight"——为你的list设置高度,这个高度值是系统自带的

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

    style="?android:attr/windowTitleBackgroundStyle"

    style="?android:attr/windowTitleStyle"

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

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

    更多细节可参考SDK文档的R.attr类。

    Everything has its time and that time must be watched. If you have any question, please contact email linqtosql@qq.com.
  • 相关阅读:
    nginx日志格式配置
    shell入门(一)
    shell批量创建随机文件名格式文件
    Centos7 下安装配置tomcat7
    Linux安装VM虚拟化软件
    mysql初探
    java.lang.ClassNotFoundException: org.apache.commons.collections.FastHashMap
    HTTP Status 500 ? Internal Server Error
    如何使用Chrome浏览器查看网页的响应头
    Servlet的API
  • 原文地址:https://www.cnblogs.com/Fill/p/7341695.html
Copyright © 2011-2022 走看看