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.
  • 相关阅读:
    《 动态规划_ 货币系统 》
    《动态规划_入门 LIS 问题 》
    数据库中左连接、右连接、全连接的区别
    http和https的区别与联系
    【复习周之流水账记录】
    web前端整套面试题(三)--网易的面试题
    微信小程序相关三、css写小黄人
    CSS选择器的匹配规则
    web前端整套面试题(二)--今日头条面试题
    有趣的逻辑题
  • 原文地址:https://www.cnblogs.com/Fill/p/7341695.html
Copyright © 2011-2022 走看看