如何手動顯示 或 隱藏 SW keyboard

 

首先 

InputMethodManager imm = (InputMethodManager)
getContext().getSystemService(Context.INPUT_METHOD_SERVICE);

顯示

imm.showSoftInput(this, 0);

隱藏

imm.hideSoftInputFromWindow(this.getWindowToken(), 0); 

創作者介紹
創作者 笨海豚部落格 的頭像
笨海豚

笨海豚部落格

笨海豚 發表在 痞客邦 留言(0) 人氣( 84 )