开发者

Getting focus on an edit text when pressing other view

i have a button and an edit text. I want to press the button and want the action to happen on edit text same that happens when edit text is pressed itself i.e. a keyboard opens f开发者_如何转开发or writing.


You do this on button click,

InputMethodManager mgr = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); mgr.showSoftInput(edit_text, InputMethodManager.SHOW_FORCED); edit_text.requestFocus();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜