开发者

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);
   } 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜