【发布时间】:2016-01-24 02:56:10
【问题描述】:
对于我的 Android 应用,我需要在用户单击图像时显示数字键盘,但不显示 EditText。 然后我想在用户按下特定键时收到通知,以便我可以适当地处理 UI。
怎么可能呢? 谢谢
【问题讨论】:
对于我的 Android 应用,我需要在用户单击图像时显示数字键盘,但不显示 EditText。 然后我想在用户按下特定键时收到通知,以便我可以适当地处理 UI。
怎么可能呢? 谢谢
【问题讨论】:
试试这个...
InputMethodManager inputMethodManager = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInputFromWindow(imageview_reference.getApplicationWindowToken(), InputMethodManager.SHOW_FORCED, 0);
【讨论】:
TextWatcher 进行监控。让我看看还有什么。你能给我们一个更好的用例吗?数字是静态的吗?是动态的
Soft Input View - developer.android.com/reference/android/inputmethodservice/…