属性 值 说明 android:orientation horizontal/vertical 设置布局水平还是垂直,默认是垂直 android:checked true/false 标记默认选中,如果是单选则选中最后一个 android:layout_gravity center/right/left/bottom/top 位置 android:gravity center/right/left/bottom/top 位置(android:gravity 属性是对该view 内容的限定.比如一个button 上面的text.你可以设置该text 在view的靠左,靠右等位置.该属性就干了这个.android:layout_gravity 是用来设置该view 相对与起父view 的位置.比如一个button 在linearlayout里,你想把该button 放在靠左靠右等位置就可以通过该属性设置.) android:hint @string 提示信息,当文本框为空的时候显示 android:numeric integer/decimal 只能输入整数/小数 android:singleLine true/false 设置单行输入,一旦设置为true,则文字不会自动换行 android:password true/false 设置密码框 android:textColor #ffffff 字体颜色 android:textStyle bold/italic/bolditalic 设置字形[bold(粗体) 0, italic(斜体) 1, bolditalic(又粗又斜) 2] 可以设置一个或多个,用“|”隔开 android:textSize 20dip 字体大小 android:capitalize characters 设置英文字母大写类型。此处无效果,需要弹出输入法才能看得到 android:textAlign center/right/left 设置文字显示位置,EditText 没有这个属性,但TextView 有 android:autoText true/false 如果设置,将自动执行输入值的拼写纠正。此处无效果,在显示输入法并输入的时候起作用。 android:editable true/false 是否可编辑 android:textColorHighlight #ffffff 被选中文字的底色 android:textColorHint #ffffff 设置提示信息文字的颜色,默认为灰色 android:textScaleX 1.5 控制字与字之间的间距 android:typeface normal/sans/serif/monospace android:background @null 空间背景,这里没有,指透明,将EditText 自定义的背景去掉 android:layout_weight 1 权重,控制控件之间的地位,在控制控件显示的大小时蛮有用的。 android:textAppearance textAppearanceButton、textAppearanceInverse、textAppearanceLarge、textAppearanceLargeInverse、textAppearanceMedium、textAppearanceMediumInverse、设置文字外观。如“?android:attr/textAppearanceLargeInverse”这里引用的是系统自...