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

更多相关文章

  1. Android(安卓)Application - No window title, Full screen, Lan
  2. Android预定义样式
  3. Android预定义样式
  4. Android禁止横屏竖屏切换
  5. Android预定义样式
  6. RecyclerView item imageview 图片宽高自适应
  7. Android预定义样式
  8. Android预定义样式
  9. Android横向时间轴实现

随机推荐

  1. android fastboot 使用
  2. Android--Activity的四种启动模式和onNew
  3. Android高手进阶教程(六)之----Android(
  4. android:fitsSystemWindows
  5. android ExpandableListView
  6. framework的调试与编译方法
  7. android 源码编译打包的apk出现accessed
  8. 编译android文件系统4.0.4错误全部解析
  9. android操作文件
  10. Android 使用android:inputType属性,从Edi