I have a fragment with a single EditText that needs the soft keyboard to remain open continually. The keyboard gets hidden when the screen is rotated. I'm calling showSoftInput in OnActivityCreated which gets executed after the rotation, but it doesn't show the keyboard.
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(edit, 0);
Note: I don't want to use toggleSoftInput. I've tried that but it ends up closing the keyboard in some instances. And there's no way to query android to determine if the keyboard is already open.