Created
August 11, 2015 08:21
-
-
Save brucetoo/7f746a47da396286c9a1 to your computer and use it in GitHub Desktop.
输入的显示和隐藏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); | |
imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS); //切换输入法的显示和隐藏 | |
imm.showSoftInput(edittext, InputMethodManager.SHOW_FORCED); //强制显示输入法,edittext为输入接收的view | |
imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0);//隐藏输入法 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment