Jam*_*mal 5 android android-widget android-softkeyboard android-edittext
在我的Android项目中,我限制Edittext
只允许使用Alphanumeric
字符.我使用下面的代码片段来实现这一点
<EditText
android:id="@+id/edt_text"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
android:ems="10"
android:imeOptions="actionNext"
android:maxLength="8"
android:padding="5dp"
android:singleLine="true" />
Run Code Online (Sandbox Code Playgroud)
但是当我使用这个代码时,如果我选中它中的Space Bar
显示soft keypad
是作为一个BackSpace
按钮并删除中的字符EditText
.有人请帮我解决这个问题.
归档时间: |
|
查看次数: |
1260 次 |
最近记录: |