EditText属性集合讲解
2015-05-14 13:59
99 查看
android:hint="请输入数字!"//设置显示在空间上的提示信息
android:numeric="integer"//设置只能输入整数,如果是小数则是:decimal
android:singleLine="true"//设置单行输入,一旦设置为true,则文字不会自动换行。
android:password="true"//设置只能输入密码
android:textColor = "#ff8c00"//字体颜色
android:textStyle="bold"//字体,bold, italic, bolditalic
android:textSize="20dip"//大小
android:capitalize = "characters"//以大写字母写
android:textAlign="center"//EditText没有这个属性,但TextView有,居中
android:textColorHighlight="#cccccc"//被选中文字的底色,默认为蓝色
android:textColorHint="#ffff00"//设置提示信息文字的颜色,默认为灰色android:textScaleX="1.5"//控制字与字之间的间距
android:typeface="monospace"//字型,normal, sans, serif, monospace
android:background="@null"//背景,这里没有,指透明
android:layout_weight="1"//权重,控制控件之间的地位,在控制控件显示的大小时蛮有用的。
android:textAppearance="?android:attr/textAppearanceLargeInverse"//文字外观
et.setSelection(et.length());//调整光标到最后一行
android:autoText //自动拼写帮助
android:editable //是否可编辑
android:autoLink=”all” //设置文本超链接样式当点击网址时,跳向该网址
android:cursorVisible设定光标为显示/隐藏,默认显示。
android:drawableLeft在text的左边输出一个drawable,如图片。
android:shadowColor指定文本阴影的颜色,需要与shadowRadius一起使用。效果:
android:shadowDx设置阴影横向坐标开始位置。
android:shadowDy设置阴影纵向坐标开始位置。
android:shadowRadius设置阴影的半径。设置为0.1就变成字体的颜色了,一般设置为3.0的效果比较好。
android:numeric="integer"//设置只能输入整数,如果是小数则是:decimal
android:singleLine="true"//设置单行输入,一旦设置为true,则文字不会自动换行。
android:password="true"//设置只能输入密码
android:textColor = "#ff8c00"//字体颜色
android:textStyle="bold"//字体,bold, italic, bolditalic
android:textSize="20dip"//大小
android:capitalize = "characters"//以大写字母写
android:textAlign="center"//EditText没有这个属性,但TextView有,居中
android:textColorHighlight="#cccccc"//被选中文字的底色,默认为蓝色
android:textColorHint="#ffff00"//设置提示信息文字的颜色,默认为灰色android:textScaleX="1.5"//控制字与字之间的间距
android:typeface="monospace"//字型,normal, sans, serif, monospace
android:background="@null"//背景,这里没有,指透明
android:layout_weight="1"//权重,控制控件之间的地位,在控制控件显示的大小时蛮有用的。
android:textAppearance="?android:attr/textAppearanceLargeInverse"//文字外观
et.setSelection(et.length());//调整光标到最后一行
android:autoText //自动拼写帮助
android:editable //是否可编辑
android:autoLink=”all” //设置文本超链接样式当点击网址时,跳向该网址
android:cursorVisible设定光标为显示/隐藏,默认显示。
android:drawableLeft在text的左边输出一个drawable,如图片。
android:shadowColor指定文本阴影的颜色,需要与shadowRadius一起使用。效果:
android:shadowDx设置阴影横向坐标开始位置。
android:shadowDy设置阴影纵向坐标开始位置。
android:shadowRadius设置阴影的半径。设置为0.1就变成字体的颜色了,一般设置为3.0的效果比较好。
相关文章推荐
- EditText属性讲解
- editText属性
- anroid的组件EditText——属性小结
- EditText中一些属性的用法
- EditText 的inputType属性
- Android Studio--EditText属性
- EditText属性大全
- Android EditText 的属性
- Android用户界面 UI组件--TextView及其子类(三) EditView以及各种Span文字样式讲解
- Android开发之EditText属性详解
- 安卓 EditText属性的总结
- EditText中imeOptions属性使用及设置无效解决
- Android之EditText 属性汇总
- EditText属性详解
- Android开发之EditText属性详解
- EditText 显示密码属性作用
- (获取选中的光标起始位置)EditText常用属性【三】:EditText选取操作
- EditText其最重要的一个属性是 android:inputType
- TextView和EditText 属性详细介绍
- android开发:EditText中android:capitalize属性的作用