对于我的 Android 应用程序,我需要在用户单击图像时显示数字键盘,但不显示 EditText。 然后我想在用户按下特定键时收到通知,以便我可以适本地处理 UI。
这怎么可能? 谢谢
最佳答案
试试这个...
InputMethodManager inputMethodManager = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInputFromWindow(imageview_reference.getApplicationWindowToken(), InputMethodManager.SHOW_FORCED, 0);
关于java - Android - 在没有 EditText 的情况下显示数字键盘,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33321522/