Keyboard not shown when i click on edittextview in android?

后端 未结 8 2322
灰色年华
灰色年华 2020-11-27 23:03

When i click on the edittextview then some times keyboard shown or some times keyboard are not shown.

In android 2.1 it show the keyboard when i click on the edittex

相关标签:
8条回答
  • 2020-11-27 23:39

    I had a similar problem on Galaxy S3 (displaying EditText controls on a PopupWindow - the keyboard was never showing). This solved my issue:

    final PopupWindow popUp = new PopupWindow(vbl.getMainLayout());
    [....]
    popUp.setFocusable(true);
    popUp.update();
    
    0 讨论(0)
  • 2020-11-27 23:39

    Possible scenarios:

    1) On clicking the EditText, usually the keyboard comes up. But if you press the back key button in the emulator the keyboard (not the screen keyboard) dimisses.

    2) In code you can disable the keyboard on clicking the EditText by setting a flag.

    InputMethodManager inputmethodmgr= (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); 
    inputmethodmgr.hideSoftInputFromWindow(myEditText.getWindowToken(), 0); 
    
    0 讨论(0)
提交回复
热议问题