#笔记#Android中自定义dialog里的EditText获取焦点时弹出软键盘输入法
final EditText et_set_psd = (EditText) view.findViewById(R.id.et_set_psd); et_set_psd.setOnFocusChangeListener(new OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { if (hasFocus) { dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); } } });
浙公网安备 33010602011771号