zoukankan      html  css  js  c++  java
  • Android 字体和颜色

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

    java代码:
    1. "?android:attr/textAppearanceLarge"
    2. "?android:attr/textAppearanceMedium"
    3. "?android:attr/textAppearanceSmall"
    复制代码

           使用方法为:

    java代码:
    1. android:textAppearance="?android:attr/textAppearanceLarge" 
    2. android:textAppearance="?android:attr/textAppearanceMedium" 
    3. android:textAppearance="?android:attr/textAppearanceSmall"
    4. style="?android:attr/textAppearanceLarge" 
    5. style="?android:attr/textAppearanceMedium" 
    6. style="?android:attr/textAppearanceSmall"
    复制代码

    字体颜色

    java代码:
    1. android:textColor="?android:attr/textColorPrimary" 
    2. android:textColor="?android:attr/textColorSecondary" 
    3. android:textColor="?android:attr/textColorTertiary" 
    4. android:textColor="?android:attr/textColorPrimaryInverse" 
    5. android:textColor="?android:attr/textColorSecondaryInverse"
    6. ProgressBar 
    7. style="?android:attr/progressBarStyleHorizontal" 
    8. style="?android:attr/progressBarStyleLarge" 
    9. style="?android:attr/progressBarStyleSmall" 
    10. style="?android:attr/progressBarStyleSmallTitle"
    复制代码

    分隔符 横向:

    java代码:
    1. <View 
    2. android:layout_width="fill_parent" 
    3. android:layout_height="1dip" 
    4. android:background="?android:attr/listDivider" />
    复制代码

    纵向:

    java代码:

    1. <View android:layout_width="1dip" 
    2. android:layout_height="fill_parent" 
    3. android:background="?android:attr/listDivider" />
    4. CheckBox 
    5. style="?android:attr/starStyle"
    6. //类似标题栏效果的TextView 
    7. style="?android:attr/listSeparatorTextViewStyle"
    8. //其它有用的样式 
    9. android:layout_height="?android:attr/listPreferredItemHeight"
    10. android:paddingRight="?android:attr/scrollbarSize"
    11. style="?android:attr/windowTitleBackgroundStyle"
    12. style="?android:attr/windowTitleStyle"
    13. android:layout_height="?android:attr/windowTitleSize"
    14. android:background="?android:attr/windowBackground"
    复制代码
    路漫漫其修远兮 吾将上下而求索
  • 相关阅读:
    section_4.python操作mysqlsql注入导入导出数据库
    section_3.单表多表查询
    section_2.约束索引存储引擎
    Section_1.Mysql基础
    day7.线程-线程队列进程池和线程池回调函数协程
    Mysql小技巧总汇
    常用对照表的参考_chapter-one(Content-Type)
    ORACLE 数据库配置
    Shiro入门(用户权限控制)
    Quartz定时任务调度机制解析(CronTirgger、SimpleTrigger )
  • 原文地址:https://www.cnblogs.com/hudabing/p/3184027.html
Copyright © 2011-2022 走看看