阅读更多

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

更多相关文章

  1. Android杂谈---Android几种预定义样式
  2. Android预定义样式
  3. Android--Listview横向滑动
  4. 短视频源码,实现文字横向移动效果(跑马灯效果)
  5. 善用Android预定义样式
  6. Android预定义样式
  7. Android预定义样式
  8. android 预定义样式简述
  9. android应用自定义字体

随机推荐

  1. Asp.net MVC 对用户输入的字符串做Trim处
  2. ASP.NET Core使用教程(9)_实用技巧
  3. C#中DateTime与时间戳转换的实例代码
  4. Asp.net MVC 对输入的字符串字段做Trim处
  5. C#中自定义控件如何实现TextBox禁止粘贴
  6. 理解Asp.Net中WebForm的生命周期_实用技
  7. C#中如何实现微信红包功能的示例代码分享
  8. 详解VS2015自带LocalDB数据库用法实例
  9. 关于C#如何实现的UDP收发请求工具类的示
  10. 简单使用的ASP.NET验证码实例代码