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開發(fā)中R.java文件丟失或無法更新的解決方法
這篇文章主要介紹了Android開發(fā)中R.java文件丟失或無法更新的解決方法,較為詳細(xì)的列舉分析了出現(xiàn)R.java文件丟失或無法更新的常見原因及相應(yīng)的解決方法,需要的朋友可以參考下2016-02-02Android開發(fā)歡迎頁點(diǎn)擊跳過倒計(jì)時(shí)進(jìn)入主頁
沒點(diǎn)擊跳過自然進(jìn)入主頁,點(diǎn)擊跳過之后立即進(jìn)入主頁,這個(gè)功能怎么實(shí)現(xiàn)呢,本文通過實(shí)例代碼給大家介紹Android開發(fā)歡迎頁點(diǎn)擊跳過倒計(jì)時(shí)進(jìn)入主頁,感興趣的朋友一起看看吧2023-12-12Android5.0多種側(cè)滑欄效果實(shí)例代碼
這篇文章主要介紹了Android5.0多種側(cè)滑欄效果實(shí)例代碼的相關(guān)資料,本文圖文并茂介紹的非常詳細(xì),需要的朋友可以參考下2016-09-09Android開發(fā)使用Messenger及Handler進(jìn)行通信的方法示例
這篇文章主要介紹了Android開發(fā)使用Messenger及Handler進(jìn)行通信的方法,結(jié)合實(shí)例形式分析了Android使用Messenger及Handler定義客戶端與服務(wù)器端實(shí)現(xiàn)通信的相關(guān)操作技巧,需要的朋友可以參考下2017-12-12Android SeekBar實(shí)現(xiàn)滑動(dòng)條效果
這篇文章主要為大家詳細(xì)介紹了Android SeekBar實(shí)現(xiàn)滑動(dòng)條效果,可以改變并顯示當(dāng)前進(jìn)度的拖動(dòng),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-07-07Android實(shí)現(xiàn)左右滑動(dòng)切換圖片
這篇文章主要為大家詳細(xì)介紹了Android實(shí)現(xiàn)左右滑動(dòng)切換圖片,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-05-05Android中實(shí)現(xiàn)在矩形框中輸入文字顯示剩余字?jǐn)?shù)的功能
在矩形輸入框框中輸入文字顯示剩余字?jǐn)?shù)的功能在app開發(fā)中經(jīng)常會見到,今天小編就通過實(shí)例代碼給大家分享android實(shí)現(xiàn)輸入框提示剩余字?jǐn)?shù)功能,代碼簡單易懂,需要的朋友參考下吧2017-04-04Android自定義View軟鍵盤實(shí)現(xiàn)搜索
本文給大家分享android自定義view軟鍵盤實(shí)現(xiàn)搜索,對android軟鍵盤相關(guān)知識感興趣的朋友一起學(xué)習(xí)吧2015-12-12