2011-03-29 53 views

回答

3

你嘗試過:

開啓:

inputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); 
// only will trigger it if no physical keyboard is open 
mgr.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); 

要關閉

InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); 
mgr.hideSoftInputFromWindow(editText.getWindowToken(), 0); 
0
((InputMethodManager)GetSystemService(Context.InputMethodService)).ToggleSoftInput(ShowShoftInputFlags.None, HideSoftInputFlags.None); 
+1

添加一個解釋將使答案,甚至更好。 – 2012-11-06 18:03:38