|
<EditText android:id="@+id/height" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:inputType="numberDecimal" /> |
inputType
較常用的輸入類型列表如下:
| 參數 | 解釋 | 參數 | 解釋 |
|---|---|---|---|
| none | 文字不可編輯 | textCapCharacters | 大寫文字 |
| text | 一般文字 | textCapWords | 字頭大寫 |
| textUri | 網址文字 | textCapSentences | 首字字頭大小 |
| number | 數字格式 | textAutoCorrect | 自動校正錯字 |
| numberSigned | 有號數字格式 | textAutoComplete | 輸入自動完成 |
| numberDecimal | 十進位數字格式 | textMultiLine | 允許多行輸入 |
| phone | 輸入電話號碼 | textNoSuggestions | 不提示 |
| datetime | 輸入日期時間 | textEmailAddress | Email格式 |
| date | 輸入日期 | textPersonName | 人名格式 |
| time | 輸入時間 | textPassword | 密碼格式 |
| textVisiblePassword | 可見密碼格式 |
請先 登入 以發表留言。