android:ems 设置TextView的宽度为N个字符的宽度。
android:maxems 设置TextView的宽度为最长为N个字符的宽度。与ems同时使用时覆盖ems选项。
android:minems 设置TextView的宽度为最短为N个字符的宽度。与ems同时使用时覆盖ems选项。
android:maxLength 限制输入字符数。如设置为5,那么仅可以输入5个汉字/数字/英文字母。
android:lines 设置文本的行数,设置两行就显示两行,即使第二行没有数据。
android:maxLines 设置文本的最大显示行数,与width或者layout_width结合使用,超出部分自动换行,超

出行数将不显示。
android:minLines 设置文本的最小行数,与lines类似。
android:lineSpacingExtra 设置行间距。
android:lineSpacingMultiplier 设置行间距的倍数。如”1.2”
android:numeric 如果被设置,该TextView有一个数字输入法。有如下值设置:integer正整数、signed带

符号整数、decimal带小数点浮点数。
android:password 以小点”.”显示文本
android:phoneNumber 设置为电话号码的输入方式。

android:singleLine 设置单行显示。如果和layout_width一起使用,当文本不能全部显示时,后面用“…

”来表示。如android:text="test_ singleLine " android:singleLine="true"

android:layout_width="20dp"将只显示“t…”。如果不设置singleLine或者设置为false,文本将自动换


android:textAppearance 设置文字外观。如“?android:attr/textAppearanceLargeInverse”这里引用的

是系统自带的一个外观,?表示系统是否有这种外观,否则使用默认的外观。可设置的值如下:

textAppearanceButton/textAppearanceInverse/textAppearanceLarge/textAppearanceLargeInverse/text

AppearanceMedium/textAppearanceMediumInverse/textAppearanceSmall/textAppearanceSmallInverse
android:textColor 设置文本颜色
android:textColorHighlight 被选中文字的底色,默认为蓝色
android:textColorHint 设置提示信息文字的颜色,默认为灰色。与hint一起使用。
android:textColorLink 文字链接的颜色.
android:textScaleX 设置文字之间间隔,默认为1.0f。参见TextView的截图。
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. 【Android 内存优化】Bitmap 长图加载 ( BitmapRegionDecoder 简
  2. 安卓开发09:常用控件-TextView文本展示
  3. Android 基本属性绘制文本对象FontMetrics介绍
  4. 改变tab中indicator文本的颜色
  5. Android中TextView富文本适配问题
  6. 如何扩展Android富文本之Html标签
  7. Android 自定义TextView 实现文本间距
  8. android 各个span类详解--用于富文本编排 下
  9. Android 显示富文本

随机推荐

  1. Android(安卓)App程序结构
  2. Android网络开发详解
  3. android 程序检查当前应用是否在运行
  4. Android(安卓)WebView 禁止输入
  5. android日志工具LogCat的使用
  6. android下如何设置系统时间
  7. Android(安卓)系统设置默认launcher
  8. Android Studio 插件(一)
  9. 处理控制器输入动作
  10. android opengl es 飘落的星星