X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=android%2Fsrc%2Forg%2Flibsdl%2Fapp%2FSDLActivity.java;h=585ad30a12ca85d5ee928a18cf1728059259174b;hb=e4aa606d7d71d9836908fab23aae7e99728b11ee;hp=9119473f534fd698aa83970175ab9bd58f43cbd1;hpb=92b319e1feed5079e42c779aa49b12ffa8672f54;p=d2df-sdl.git diff --git a/android/src/org/libsdl/app/SDLActivity.java b/android/src/org/libsdl/app/SDLActivity.java index 9119473..585ad30 100644 --- a/android/src/org/libsdl/app/SDLActivity.java +++ b/android/src/org/libsdl/app/SDLActivity.java @@ -4,7 +4,6 @@ import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.lang.reflect.Method; -import java.util.Objects; import android.app.*; import android.content.*; @@ -218,6 +217,8 @@ public class SDLActivity extends Activity { SDLActivity.onNativeDropFile(filename); } } + + hideNavigationBar(); } // Events @@ -242,6 +243,8 @@ public class SDLActivity extends Activity { mNextNativeState = NativeState.RESUMED; mIsResumedCalled = true; + hideNavigationBar(); + if (SDLActivity.mBrokenLibraries) { return; } @@ -457,6 +460,8 @@ public class SDLActivity extends Activity { InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0); + hideNavigationBar(); + mScreenKeyboardShown = false; } break; @@ -542,7 +547,7 @@ public class SDLActivity extends Activity { { int orientation = -1; - if (!Objects.equals(hint, "")) { + if (hint != null && !hint.equals("")) { if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) { orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE; } else if (hint.contains("LandscapeRight")) { @@ -844,6 +849,15 @@ public class SDLActivity extends Activity { return messageboxSelection[0]; } + public static void hideNavigationBar() { + if (Build.VERSION.SDK_INT >= 19) { + int opt = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN + | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; + mSingleton.getWindow().getDecorView().setSystemUiVisibility(opt); + } + } + @Override protected Dialog onCreateDialog(int ignore, Bundle args) {