android:layout_gravity="center_vertical"//設置控件顯示的位置:默認top,這裏居中顯示,還有bottom
android:hint="請輸入數字!"//設置顯示在空間上的提示信息
android:numeric="integer"//設置只能輸入整數,如果是小數則是:decimal
android:singleLine="true"//設置單行輸入,一旦設置爲true,則文字不會自動換行。
<!--
android:gray="top" //多行中指針在第一行第一位置
et.setSelection(et.length());//調整光標到最後一行
Android:autoText//自動拼寫幫助
Android:capitalize//首字母大寫
Android:digits//設置只接受某些數字
Android:singleLine //是否單行或者多行,回車是離開文本框還是文本框增加新行
Android:numeric //只接受數字
Android:password //密碼
Android:phoneNumber // 輸入電話號碼
Android:editable //是否可編輯
Android:autoLink=”all” //設置文本超鏈接樣式當點擊網址時,跳向該網址
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"//文字外觀,這裏引用的是系統自帶的一個外觀,?表示系統是否有這種外觀,否則使用默認的外觀。不知道這樣理解對不對?