Description:
- EditText gets focus and pops up soft keyboard using timer perfect solution
- You can control the timing of the pop-up
passwordInputView = dialogView.findViewById(R.id.pay_password); passwordInputView.setFocusable(true); passwordInputView.setFocusableInTouchMode(true); passwordInputView.requestFocus(); Timer timer = new Timer(); timer.schedule(new TimerTask() { public void run() { InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS); }}, 100); // How long does the soft keyboard pop up after display? 100=0.1/sCopy the code
Share with you
I want to work my way up
Fly forward on the blades at the highest point
Let the wind blow dry tears and sweat
I want to work my way up
Waiting for the sun to watch its face
Little days have big dreams
I have my day
Let the wind blow dry tears and sweat
One day I will have my day