问题描述
对于我的Android应用程序,我需要在用户单击图像时显示数字键盘,但不显示EditText。 然后,我想在用户按下特定键时得到通知,以便我可以适当地处理UI。
怎么做? 谢谢
1楼
尝试这个...
InputMethodManager inputMethodManager = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInputFromWindow(imageview_reference.getApplicationWindowToken(), InputMethodManager.SHOW_FORCED, 0);