对于能够显示文字的控件(如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"
分享到:
相关推荐
android TIPS小结android TIPS小结android TIPS小结android TIPS小结
Android-Tips This is an awesome list of tips for android. If you are a beginner, this list will be the first choice for you when you have a difficult time. Welcome Star and Fork, your support is my ...
Android-android-tips-tricks.zip,[备忘]android开发的技巧,安卓系统是谷歌在2008年设计和制造的。操作系统主要写在爪哇,C和C 的核心组件。它是在linux内核之上构建的,具有安全性优势。
android 自定义RadioButton的样式android 自定义RadioButton的样式
Android 自定义Spinner样式的 选择框背景,选择框文字属性,弹出框文字属性
各种android弹出dialog效果以及各种dialog样式各种android弹出dialog效果以及各种dialog样式各种android弹出dialog效果以及各种dialog样式各种android弹出dialog效果以及各种dialog样式各种android弹出dialog效果...
android Preference自定义样式
对于android项目开发来说,常常会用到Spinner实现下拉框的效果。而对于Spinner加载适配器的方法有多种: 1.直接加载android自带的ArrayAdapter,SimpleAdapter; 2.自定义继承BaseAdapter的适配器。 对于适配器加载...
android TextView 支持CSS样式
这个demo是关于android中继承Dialog重新自定义一个ProgressDialog。 需求:带加载图片和文字说明,可定时停止也可被动中断。 如有BUG或者不完善,欢迎小伙伴们提出~
android用ListView实现表格样式
Android-QMUI_Android.zip,安卓用户界面,安卓系统是谷歌在2008年设计和制造的。操作系统主要写在爪哇,C和C 的核心组件。它是在linux内核之上构建的,具有安全性优势。
该例子通过从外面配置ANDROID项目的主题和样式,实现修改系统默认的控件的样式和风格
Android仿微信发现图片样式 Android仿微信发现图片样式 Android仿微信发现图片样式 我的博客:http://blog.csdn.net/xiaoyuan511
android自定义ProgressDialog样式详解,一分钟教会你如何自定义android样式。
自定义的 SeekBar 样式,实现很简单,有需要的可以看看,本demo是仿酷狗SeekBar 的样式,进度条上小圆球可以随意拖动,如果不需要小圆球的只需要将main.xml里面的android:thumb="@drawable/seek_thumb"去掉就行了...
包含所有的Android Layout的样式布局和属性讲解
android开发进度条的实现样式包括三种(图片,style,动画),研究完成后可以完美解决各种进度条的展示
AndroidStudio将成为开发Android的主流,如此利器怎能没一款好看的主题样式,这是一款不错主题样式