I am using multiple activities in my tab activity. There is an edit text field in my first activity under the first tab, but when I move from first activity within the first tab to the second activity and when I go back to my first activity using replaceview property and pressing the hardware back button, my edit text field do not show the softinputkeyboard.
What should I do in this? I used onResume this code, but still not working.
edittext.requestFocus();
InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.showSoftInput(etSearch, InputMethodManager.SHOW_IMPLICIT);
help me out in this. Thanks in advance.
this happens because edittext.requestFocus() does not focus the element immediately.
try this approach: