【Android】EditText标签调用键盘
?轉(zhuǎn)自天翼空間開發(fā)資料。
在xml文件中EditText標(biāo)簽有一個(gè)屬性android:editable="false"和android:numeric="integer"
android:numeric="integer"表示只允許輸入數(shù)字,此屬性可以限制用戶只能輸入數(shù)字內(nèi)容。
android:editable表示是否可以輸入內(nèi)容TRUE表示可以輸入,false表示不允許輸入內(nèi)容;
當(dāng)為android:editable="false"時(shí),點(diǎn)擊輸入框,虛擬鍵盤是顯示不出來的,不過當(dāng)設(shè)置了 android:editable=""屬性時(shí),不管是false還是true,在其后加入android:numeric="integer"屬性時(shí),是可以輸入數(shù)字內(nèi)容了;這里沒搞明白是怎么回事,也許是numeric把前面的屬性覆蓋掉了。
當(dāng)android:editable="false"時(shí),在java類里如果再規(guī)定EditText.setEnabled(true)時(shí),虛擬鍵盤還是不會(huì)顯示的。
轉(zhuǎn)載于:https://blog.51cto.com/5371904/916818
總結(jié)
以上是生活随笔為你收集整理的【Android】EditText标签调用键盘的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 循环语句:For循环
- 下一篇: linux6.0 SVN 服务搭建