android EditText 属性
来源:互联网 发布:百丽淘宝旗舰店 编辑:程序博客网 时间:2024/06/05 20:45
EditText继承关系:View-->TextView-->EditText。
EditText的属性很多,这里介绍几个:
android:layout_gravity="center_vertical"
设置控件显示的位置:默认top,这里居中显示,还有bottom
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"
- android edittext的属性
- android edittext的属性
- android EditText 属性
- android EditText 属性介绍
- Android开发EditText属性
- Android EditText属性总结
- Android开发EditText属性
- Android开发EditText属性
- android中edittext属性
- Android开发EditText属性
- Android--EditText属性
- Android开发EditText属性
- 【android】EditText属性大全
- Android开发EditText属性
- Android开发EditText属性
- Android中EditText属性
- Android开发EditText属性
- android EditText输入属性
- 修改SQLPATH
- 均匀NURBS曲线显示
- vs2005中神秘的出现空格用点,制表符用箭头替换了
- wcf使用
- java查询语句的格式化
- android EditText 属性
- 欢迎访问坤龙的博客
- 21个故事
- rolePermission/app-contex.xml ( 编号:20110622A1625 )
- 浮点数的二进制表示学习笔记
- 50个代码网站
- oracle执行计划与统计信息的一些总结
- CommonClass类中方法
- android打电话、发短信实现