2011년 1월 6일 목요일

[Android] 소프트 키보드 관리

1. 키보드 감추기
EditText editText = (EditText) findViewById(R.id.edit);
InputMethodManager imm = (InputMethodManager) getSystemService (Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);

2. 키보드 보여주기
EditText editText = (EditText) findViewById(R.id.edit);
InputMethodManager imm = (InputMethodManager) getSystemService (Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED);



댓글 없음:

댓글 쓰기