How to enable both hardware and virtual keyboards on Android ice cream sandwich

前端 未结 6 1355
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 13:47

I\'m developping a stock management application with Django for a customer\'s company, and want to use an ice cream sandwich tablet as the end-user device. I use an USB barc

6条回答
  •  余生分开走
    2020-12-05 14:22

    Try this to force to open soft keyboard:

    ((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
    

    To close back the soft keyboard:

    ((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(_pay_box_helper.getWindowToken(), 0);
    

提交回复
热议问题