Commit 5d5a56717f32d2978c3107ef74bf67bd4d767f37

Sylvain Becker 2019-12-19T13:54:03

Fixed bug 4906 - Pressing Back button terminates app after SDL_StartTextInput

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
index 91ce1ee..6a5c84a 100644
--- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -633,6 +633,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
                     imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
 
                     mScreenKeyboardShown = false;
+
+                    mSurface.requestFocus();
                 }
                 break;
             case COMMAND_SET_KEEP_SCREEN_ON: