Open keyboard for EditText inside a TextView
I have a Spinner(inside a dialog) that contains an EditText as one of its element. The problem is that no keyboard is shown when I click inside the EditText. I tried various methods like manually opening the softkeyboard with the InputMethodManager whenever there is an开发者_开发问答 OnClick or OnItemSelected event occurs but none of these worked for me.
Any tips?
Thanks in advance.
Try this,
InputMethodManager m = (InputMethodManager)
if(m != null){
m.toggleSoftInput(0, InputMethodManager.SHOW_IMPLICIT);
}
精彩评论