我有三个编辑文本字段。在这些字段中,我只想为第一个字段显示软输入键盘,对于后两个字段禁用,这是日期和时间字段。
Edit-Text 1 //Show the keyboard
Edit-Text 2 and 3 //Hide the keyboard
通过使用下面的代码,我可以禁用字段2和3的键盘,但是当用户集中在字段1时,键盘就会出现,但是当用户点击字段2或3时,键盘就不会隐藏。虽然当字段2或3首先被点击时,没有键盘出现。
//Code to disable soft input keyboard
public static void disableSoftInputFromAppearin
我需要用于EditText的键盘,它与我的EditText重叠,但我需要EditText视图下的键盘。
EDIT:
finally i got the answer for this. we need to set
android:imeOptions="flagNoExtractUi" in `edittext`
它会隐藏弹出窗口。
我知道这个问题已经被问了很多,但我尝试了几种建议的解决方案,但都没有像预期的那样有效。
我有一个EditText,当我启动该活动时,它会打开键盘,如何防止它启动键盘。
//Solutions I have tried thus far
//Solution 1
//XML
android:editable ="false" <!--is deprecated & does not work-->
//Solution 2
//XML
android:focusable="false" <!--Can no longer use the