EditText继承关系:View-->TextView-->EditText
android:layout_width='fill_parent' //宽度填充父组件
android:layout_height='58px' //自定义宽度
android:gravity='left|center_vertical' //将输入框的字体位置定义为居左+垂直居中android:hint='@string/thread_post_title_def' //自定义默认显示的文字 初始化文字android:layout_below='@id/topbanner' //自定义显示的位置 位于xxx控件之下android:layout_marginTop='10px' //自定义左外边距 android:layout_marginLeft='10px'
android:layout_marginRight='10px'
android:background='@drawable/thread_title_input' //自定义背景 背景是下面的thread_title_input.xml 位于drawablez文件夹中android:textColor='#FFFFFF' //自定义输入文字的颜色android:textColorHint='#FFFFFF' //自定义默认文字的颜色
android:paddingLeft='15px' //自定义缩进的大小 通过内边距来实现缩进
android:color='@color/thread_title_input' //自定义输入框的背景色 也可以是图片等等
android:radius='5dip' //自定义显示的圆角大小
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:layout_gravity='center_vertical'//设置控件显示的位置:默认top,这里居中显示,还有bottom
android:gray='top' //多行中指针在第一行第一位置
et.setSelection(et.length());//调整光标到最后一行
android:autoText //自动拼写帮助
android:capitalize //首字母大写
android:digits //设置只接受某些数字
Android:singleLine//是否单行或者多行,回车是离开文本框还是文本框增加新行
android:numeric //只接受数字
android:phoneNumber //输入电话号码
android:editable //是否可编辑
android:autoLink=”all” //设置文本超链接样式当点击网址时,跳向该网址
android:layout_width='fill_parent' //宽度填充父组件
android:layout_height='58px' //自定义宽度
android:gravity='left|center_vertical' //将输入框的字体位置定义为居左+垂直居中android:hint='@string/thread_post_title_def' //自定义默认显示的文字 初始化文字android:layout_below='@id/topbanner' //自定义显示的位置 位于xxx控件之下android:layout_marginTop='10px' //自定义左外边距 android:layout_marginLeft='10px'
android:layout_marginRight='10px'
android:background='@drawable/thread_title_input' //自定义背景 背景是下面的thread_title_input.xml 位于drawablez文件夹中android:textColor='#FFFFFF' //自定义输入文字的颜色android:textColorHint='#FFFFFF' //自定义默认文字的颜色
android:paddingLeft='15px' //自定义缩进的大小 通过内边距来实现缩进
android:color='@color/thread_title_input' //自定义输入框的背景色 也可以是图片等等
android:radius='5dip' //自定义显示的圆角大小
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:layout_gravity='center_vertical'//设置控件显示的位置:默认top,这里居中显示,还有bottom
android:gray='top' //多行中指针在第一行第一位置
et.setSelection(et.length());//调整光标到最后一行
android:autoText //自动拼写帮助
android:capitalize //首字母大写
android:digits //设置只接受某些数字
Android:singleLine//是否单行或者多行,回车是离开文本框还是文本框增加新行
android:numeric //只接受数字
android:phoneNumber //输入电话号码
android:editable //是否可编辑
android:autoLink=”all” //设置文本超链接样式当点击网址时,跳向该网址