Android中如何自动弹出软键盘

  edtsearch_title = (EditText) findViewById(R.id.edtsearch_title);
  edtsearch_title.setFocusable(true);
  edtsearch_title.setFocusableInTouchMode(true);
  edtsearch_title.requestFocus();
  InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
  imm.showSoftInput(edtsearch_title, InputMethodManager.RESULT_SHOWN);
  imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
  

你可能感兴趣的:(Android中如何自动弹出软键盘)