我有三个编辑文本字段。在这些字段中,我只想为第一个字段显示软输入键盘,对于后两个字段禁用,这是日期和时间字段。
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中输入数字信息,但输出的格式需要类似于"##.###,##“(# in 0..9)。我在TextWatcher中设置的格式...这很好,TextWatcher完成了这项工作...但是,当用户选择标记为文本的EditText时,将显示AlphaKeyboard,如果我选择EditText作为数字,则会显示所需的键盘,并且TextWatcher停止工作。
我正在开发Android智能电视应用程序:
在view中有一个自定义键盘和一个EditText。
当应用程序启动时,焦点会转到键盘上。
所需:
- When the user types with keyboard (clicking with a remote) the cursor should also blink inside the `editText`.
如何在EditText中显示这种效果?