Android 2.2 API 中文文档系列(1) —— TextView
一、
? ?android:text
? ?设置显示文本.
? ?android:textAppearance
? 设置文字外观。如“?android:attr/textAppearanceLargeInverse?”这里引用的是系统自带的一个外观,?表示系统是否有这种外观,否则使用默认的外观。可设置的值如下:textAppearanceButton/textAppearanceInverse/textAppearanceLarge/textAppearanceLargeInverse/textAppearanceMedium/textAppearanceMediumInverse/textAppearanceSmall/textAppearanceSmallInverse
? ?android:textColor
? ?设置文本颜色
? ?android:textColorHighlight
? ?被选中文字的底色,默认为蓝色
? ?android:textColorHint
? ?设置提示信息文字的颜色,默认为灰色。与hint一起使用。
? ?android:textColorLink
? ?文字链接的颜色.
? ?android:textScaleX
? ?设置文字之间间隔,默认为1.0f。分别设置0.5f/1.0f/1.5f/2.0f效果如下:
2010-10-19 13:11:09
?
?? ?
android:textSize
? ?设置文字大小,推荐度量单位”sp”,如”15sp”
? ?android:textStyle
? ?设置字形[bold(粗体) 0, italic(斜体) 1, bolditalic(又粗又斜) 2] 可以设置一个或多个,用“|”隔开
? ?android:typeface
? ?设置文本字体,必须是以下常量值之一:normal 0, sans 1, serif 2, monospace(等宽字体)? 3]
? ?android:height
? ?设置文本区域的高度,支持度量单位:px(像素)/dp/sp/in/mm(毫米)
? ?android:maxHeight
? ?设置文本区域的最大高度
? ?android:minHeight
? ?设置文本区域的最小高度
? ?android:width
? ?设置文本区域的宽度,支持度量单位:px(像素)/dp/sp/in/mm(毫米),与layout_width的区别看这里。
? ?android:maxWidth
? ?设置文本区域的最大宽度
? ?android:minWidth
? ?设置文本区域的最小宽度
1.3 补充说明
1.3.1 以下几个属性以及输入法相关的在这里都没有效果,在EditText将补充说明。
android:numeric/android:digits/android:phoneNumber/android:inputMethod/android:capitalize/android:autoText
1.4 Word格式的API文档下载
? ? ? ? ? 附件: Android 2.2 API 中文文档系列(1) —— TextView.rar (下载 18 次)
二、例子
2.1 跑马灯的效果
? ? ? ? ? ? ? ? ? ? [Android 1.5]TextView跑马灯效果
三、系列
Android 2.2 API 中文文档系列(1) —— TextView
Android 2.2 API 中文文档系列(2) —— EditText
Android 2.2 API 中文文档系列(3) —— AccessibilityService
Android 2.2 API 中文文档系列(4) —— Manifest
Android 2.2 API 中文文档系列(5) —— View
Android 2.2 API 中文文档系列(6) —— ImageView
Android 2.2 API 中文文档系列(7) —— ImageButton
Android 2.2 API 中文文档系列(8) —— QuickContactBadge
Android 2.2 API 中文文档系列(9) —— ZoomButton
Android 2.2 r1 API 中文文档系列(10) —— CheckBox
Android 2.2 r1 API 中文文档系列(11) —— RadioButton
Android 2.2 r1 API 中文文档系列(12) —— Button
Android 2.2 r1 API 中文文档系列(13) —— ToggleButton
Android 2.2 r1 API 中文文档系列(14) —— ViewStub
Android 2.2 r1 API 中文文档系列(15) —— GridView
Android 2.2 r1 API 中文文档系列(16) —— AnalogClock
Android 2.2 r1 API 中文文档系列(17) —— TextSwitcher
Android 2.2 r1 API 中文文档系列(18) —— AbsSeekBar
Android 2.2 r1 API 中文文档系列(19) —— TwoLineListItem
Android 2.2 r1 API 中文文档系列(20) —— DatePicker
Android 2.2 r1 API 中文文档系列(21) —— DigitalClock
Android 2.2 r1 API 中文文档系列(22) —— MultiAutoCompleteTextView
Android 2.2 r1 API 中文文档系列(23) —— MultiAutoCompleteTextView.Tokenizer
Android 2.2 r1 API 中文文档系列(24) —— MultiAutoCompleteTextView.CommaTokenizer
Android 2.2 r1 API 中文文档系列(25) —— ZoomControls
Android 2.2 r1 API 中文文档系列(26) —— SeekBar
Android 2.2 r1 API 中文文档系列(27) —— SeekBar.OnSeekBarChangeListener
Android 2.2 r1 API 中文文档系列(28) —— CheckedTextView
合集