在 EditText 上模拟 Touch 事件以显示软键盘
Simulate Touch event on EditText to show soft keyboard
我有一个不可见的 EditText:ReplyInput 和一个按钮:ShowReply.
我想在点击 ShowReply 后显示 ReplyInput 和软键盘。
有人对此有任何想法吗?
感谢阅读:)
类似的东西:
InputMethodManager manager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
manager.showSoftInput(ReplyInput, InputMethodManager.SHOW_IMPLICIT);
一种方法是在单击 Button 并使用 InputMethodManager
调出软键盘 (Here's how to do it) 时使 EditText 可见,但还有一种更好的方法,那就是显示 EditText,然后将点一下,这样软键盘会自动调出来
我有一个不可见的 EditText:ReplyInput 和一个按钮:ShowReply.
我想在点击 ShowReply 后显示 ReplyInput 和软键盘。
有人对此有任何想法吗?
感谢阅读:)
类似的东西:
InputMethodManager manager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
manager.showSoftInput(ReplyInput, InputMethodManager.SHOW_IMPLICIT);
一种方法是在单击 Button 并使用 InputMethodManager
调出软键盘 (Here's how to do it) 时使 EditText 可见,但还有一种更好的方法,那就是显示 EditText,然后将点一下,这样软键盘会自动调出来