The situation:
I have Activity A. It hast one field. And when user presses "OK", it opens Activity B, which is just a confirmation dialog. Now when user presses "Cancel" button in activity B (setResult(RESULT_CANCEL); finish();), user ends up back on Activity A.
At this point I would like to show the keyboard again, because the only thing, which user can do is editing the field.
But for some strange reason it does not work for me. I looked at this discussion and tried settings
android:windowSoftInputMode="stateAlwaysVisible|adjustResize"
in manifest or calling
inputMethodManager.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
in either onCreate() or onStart() or onResume(), but none of these works.
I should add, that this problem only shows up, when I "go back from other activity". When the activity is created during forward navigation to it, then the keyboard is shown as expected.
Any suggestions on how to handle this problem would be appreciated.