0
對於我的Android應用程序,我需要在用戶單擊圖像時顯示數字鍵盤,但不顯示EditText。 我想在用戶按下特定的按鍵時得到通知,以便我可以適當地處理UI。Android - 顯示沒有EditText的數字鍵盤
這怎麼辦? 謝謝
對於我的Android應用程序,我需要在用戶單擊圖像時顯示數字鍵盤,但不顯示EditText。 我想在用戶按下特定的按鍵時得到通知,以便我可以適當地處理UI。Android - 顯示沒有EditText的數字鍵盤
這怎麼辦? 謝謝
嘗試......
InputMethodManager inputMethodManager = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInputFromWindow(imageview_reference.getApplicationWindowToken(), InputMethodManager.SHOW_FORCED, 0);
謝謝!但是關鍵事件的聽衆呢? –
我會使用'TextWatcher'來監視。讓我看看還有什麼。你能給我們一個更好的用例嗎?數字是靜態的嗎?它是動態的 – overflowingStack
http://stackoverflow.com/questions/2261914/catch-keypress-with-android – overflowingStack