1
当我的活动加载时,我希望txtEdit EditText小部件获得焦点并显示键盘。Android Form EditText显示键盘onResume
我在onResume()中试过这个,但它不会自动显示。
@Override
protected void onResume() {
InputMethodManager mgr = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.showSoftInput(txtSearch, InputMethodManager.SHOW_IMPLICIT);