- 只需要添加
-
- editTextPassword.setFocusable(true);
- editTextPassword.setFocusableInTouchMode(true);
- editTextPassword.requestFocus();
-
- @Override
- public void onResume() {
- super.onResume();
- log.info("onResume");
- (new Handler()).postDelayed(new Runnable() {
- public void run() {
- log.info("postDelayed");
- InputMethodManager inManager = (InputMethodManager)editTextPassword.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
- inManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
- }
- },500);
- }
Android中DialogFragment自动弹出输入法
最新推荐文章于 2024-05-29 16:27:23 发布