对于能够显示文字的控件(如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"

分隔符

横向:

      android:layout_height="1dip" 
      android:background="?android:attr/listDivider" />

纵向:

      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/3106831

2

更多相关文章

  1. Android预定义样式
  2. Android开发textview中跑马灯效果
  3. 横向滚动条的设置
  4. Android(安卓)之Tab
  5. android中用Spannable在TextView中设置超链接、颜色、字体
  6. android中用Spannable在TextView中设置超链接、颜色、字体
  7. android中用Spannable在TextView中设置超链接、颜色、字体
  8. android中用Spannable在TextView中设置超链接、颜色、字体
  9. TextView跑马灯效果

随机推荐

  1. MySQL使用show status查看MySQL服务器状
  2. MySQL闪回(flashback)原理与实战
  3. MySQL启用慢查询日志记录方法
  4. mysql优化利器之explain使用介绍
  5. mysql explain的用法(使用explain优化查
  6. MySQL索引操作命令详解
  7. MySQL创建全文索引分享
  8. 详解Ubuntu Server下启动/停止/重启MySQL
  9. mysql免安装版1067错误终极解决办法图文
  10. MySQL 设计和命令行模式下建立详解