Android編程開發(fā)之EditText中inputType屬性小結(jié)
本文總結(jié)分析了Android編程開發(fā)之EditText中inputType屬性。分享給大家供大家參考,具體如下:
android 1.5以后添加了軟件虛擬鍵盤的功能,所以在輸入提示中將會有對應(yīng)的軟鍵盤模式。
android中inputType屬性在EditText輸入值時(shí)啟動(dòng)的虛擬鍵盤的風(fēng)格有著重要的作用。這也大大的方便的操作。有時(shí)需要虛擬鍵盤只為字符或只為數(shù)字。所以inputType尤為重要。
文本類型,多為大寫、小寫和數(shù)字符號。
android:inputType="none"
android:inputType="text"
android:inputType="textCapCharacters" 字母大寫
android:inputType="textCapWords" 首字母大寫
android:inputType="textCapSentences" 僅第一個(gè)字母大寫
android:inputType="textAutoCorrect" 自動(dòng)完成
android:inputType="textAutoComplete" 自動(dòng)完成
android:inputType="textMultiLine" 多行輸入
android:inputType="textImeMultiLine" 輸入法多行(如果支持)
android:inputType="textNoSuggestions" 不提示
android:inputType="textUri" 網(wǎng)址
android:inputType="textEmailAddress" 電子郵件地址
android:inputType="textEmailSubject" 郵件主題
android:inputType="textShortMessage" 短訊
android:inputType="textLongMessage" 長信息
android:inputType="textPersonName" 人名
android:inputType="textPostalAddress" 地址
android:inputType="textPassword" 密碼
android:inputType="textVisiblePassword" 可見密碼
android:inputType="textWebEditText" 作為網(wǎng)頁表單的文本
android:inputType="textFilter" 文本篩選過濾
android:inputType="textPhonetic" 拼音輸入 //數(shù)值類型
android:inputType="number" 數(shù)字
android:inputType="numberSigned" 帶符號數(shù)字格式
android:inputType="numberDecimal" 帶小數(shù)點(diǎn)的浮點(diǎn)格式
android:inputType="phone" 撥號鍵盤
android:inputType="datetime" 時(shí)間日期
android:inputType="date" 日期鍵盤
android:inputType="time" 時(shí)間鍵盤
更多關(guān)于Android控件相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《Android控件用法總結(jié)》
希望本文所述對大家Android程序設(shè)計(jì)有所幫助。
- Android中的windowSoftInputMode屬性詳解
- android 使用uinput模擬輸入設(shè)備的方法
- Android WebView 不支持 H5 input type="file" 解決方法
- Android 數(shù)據(jù)存儲之 FileInputStream 工具類及FileInputStream類的使用
- Android WebView支持input file啟用相機(jī)/選取照片功能
- Android網(wǎng)頁H5 Input選擇相機(jī)和系統(tǒng)相冊
- 詳解Android WebView的input上傳照片的兼容問題
- Android自定義PasswordInputView密碼輸入
- Android InputMethodManager輸入法簡介
- 從"Show?tabs"了解Android?Input系統(tǒng)
相關(guān)文章
Android MarginDesign控件TabLayout導(dǎo)航欄使用詳解
這篇文章主要為大家詳細(xì)介紹了Android MarginDesign控件TabLayout導(dǎo)航欄使用,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-01-01
Android動(dòng)態(tài)顯示當(dāng)前年月日時(shí)分秒系統(tǒng)時(shí)間(示例代碼)
這篇文章主要介紹了Android動(dòng)態(tài)顯示當(dāng)前年月日時(shí)分秒系統(tǒng)時(shí)間的示例代碼,需要的朋友可以參考下2017-05-05
Android 滑動(dòng)監(jiān)聽RecyclerView線性流+左右劃刪除+上下移動(dòng)
這篇文章主要介紹了Android 滑動(dòng)監(jiān)聽RecyclerView線性流+左右劃刪除+上下移動(dòng)的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-09-09
Android 自定義控件實(shí)現(xiàn)顯示文字的功能
這篇文章主要介紹了Android 自定義控件實(shí)現(xiàn)顯示文字的功能的相關(guān)資料,需要的朋友可以參考下2016-11-11
Android模仿To圈兒個(gè)人資料界面層疊淡入淡出顯示效果
這篇文章主要介紹了Android模仿To圈兒個(gè)人資料界面層疊淡入淡出顯示效果的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-07-07
Android使用ftp方式實(shí)現(xiàn)文件上傳和下載功能
這篇文章主要介紹了Android使用ftp方式實(shí)現(xiàn)文件上傳和下載功能,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-06-06

