首页 > 代码库 > Dialog中EditText获取焦点,并且自动弹出软键盘
Dialog中EditText获取焦点,并且自动弹出软键盘
//解决dilaog中EditText无法弹出输入的问题 dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); //弹出对话框后直接弹出键盘 et_newReason.setFocusableInTouchMode(true); et_newReason.requestFocus(); CmzStaffApplication.handler.postDelayed(new Runnable() { @Override public void run() { InputMethodManager inputManager =(InputMethodManager) et_newReason.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.showSoftInput(et_newReason, 0); } }, 100);
Dialog中EditText获取焦点,并且自动弹出软键盘
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。