X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=build-projects%2Fandroid%2Fapp%2Fsrc%2Fmain%2Fjava%2Forg%2Flibsdl%2Fapp%2FSDLActivity.java;h=da32aea2bdfbe452cba66b7f5e2aae73ebf6a447;hb=bdda8328c686949f91cf2ce84cd719eb259ba94e;hp=9144949b619417e235d250b212d23fc3dd3b85c4;hpb=42ff780b1f0470fc5b2cb5ee02e9d8e1150eaf67;p=rocksndiamonds.git diff --git a/build-projects/android/app/src/main/java/org/libsdl/app/SDLActivity.java b/build-projects/android/app/src/main/java/org/libsdl/app/SDLActivity.java index 9144949b..da32aea2 100644 --- a/build-projects/android/app/src/main/java/org/libsdl/app/SDLActivity.java +++ b/build-projects/android/app/src/main/java/org/libsdl/app/SDLActivity.java @@ -871,7 +871,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh if (!is_portrait_allowed && !is_landscape_allowed) { if (resizable) { /* All orientations are allowed */ - req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR; + req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER; } else { /* Fixed window and nothing specified. Get orientation from w/h of created window */ req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); @@ -881,7 +881,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh if (resizable) { if (is_portrait_allowed && is_landscape_allowed) { /* hint allows both landscape and portrait, promote to full sensor */ - req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR; + req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER; } else { /* Use the only one allowed "orientation" */ req = (is_landscape_allowed ? orientation_landscape : orientation_portrait); @@ -2183,7 +2183,7 @@ class DummyEdit extends View implements View.OnKeyListener { // FIXME: A more effective solution would be to assume our Layout to be RelativeLayout or LinearLayout // FIXME: And determine the keyboard presence doing this: http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android // FIXME: An even more effective way would be if Android provided this out of the box, but where would the fun be in that :) - if (event.getAction()==KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) { + if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) { if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() == View.VISIBLE) { SDLActivity.onNativeKeyboardFocusLost(); }