new Handler().postDelayed(new Runnable() {
public void run() {
// TODO Auto-generated method stub
opeSystemKeyBoard();
}
}, 100);
//延时抛到主线程的目的是避免在界面没加载完成时,软键盘拉不起来的问题
public void opeSystemKeyBoard() {
InputMethodManager imm = (InputMethodManager) this
.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(this.getCurrentFocus(),
InputMethodManager.SHOW_FORCED);
}
时间: 2024-10-29 19:10:32