Android TextView属性大全
来源:互联网 发布:数据通讯设备 编辑:程序博客网 时间:2024/06/05 10:45
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/textAppearanceMedium/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 设置文本区域的最小宽度
- android TextView属性大全
- android TextView属性大全
- 【android】TextView属性大全
- Android----TextView属性大全
- android textview属性大全
- Android<TextView>属性大全
- Android TextView属性大全
- Android:TextView属性大全
- Android TextView属性大全
- Android TextView属性大全
- Android:TextView属性大全
- Android:TextView属性大全
- Android TextView属性大全
- Android:TextView属性大全
- Android:TextView属性大全
- android TextView 属性大全
- Android--TextView属性大全
- Android TextView属性大全
- java计算工作日方法
- C++ string字符串
- JSTL(fn函数)
- PHP每15分钟自动更新网站地图,减少服务器消耗!
- x-editable在angular中亲身使用小结
- Android TextView属性大全
- RabbitMQ开机自启动脚本
- 第十一周项目三C/C++图遍历算法实现
- 人脸检测-opencv_haar
- 【android】5、清单文件
- spark rpc远程调用基础
- angularjs 点击查询按钮模糊过滤器
- 框架开发中处理异步操作的方式,善用回调函数。
- 解决spring boot整合mybatis时 返回map value为空字段不显示