[Scummvm-git-logs] scummvm master -> b92a474ea1111648d6010dc52df975803c2e37ad
antoniou79
a.antoniou79 at gmail.com
Tue Aug 11 07:38:32 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b92a474ea1 ANDROID: Enable Immersive Sticky mode
Commit: b92a474ea1111648d6010dc52df975803c2e37ad
https://github.com/scummvm/scummvm/commit/b92a474ea1111648d6010dc52df975803c2e37ad
Author: antoniou (a.antoniou79 at gmail.com)
Date: 2020-08-11T10:36:26+03:00
Commit Message:
ANDROID: Enable Immersive Sticky mode
This hides the status and navigation (system UI) bars
The user has to swipe at the edge of the screen (top and right respectively) to show the system status and navigation bars
Changed paths:
backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
index 0b470b5d06..ea94f11a53 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
@@ -195,6 +195,18 @@ public class ScummVMActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ // TODO setSystemUiVisibility is introduced in API 11 and deprecated in API 30 - When we move to API 30 we will have to replace this code
+ // TODO Code is taken from https://www.techrepublic.com/article/give-android-users-an-immersive-experience-by-using-kitkats-full-screen-decor-flags/
+ // The code sample in the above url contains code to switch between immersive and default mode by clicking a button.
+ // We could do something similar by making it a Global UI option.
+ getWindow().getDecorView().setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
+ | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
+ | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
+
setVolumeControlStream(AudioManager.STREAM_MUSIC);
setContentView(R.layout.main);
More information about the Scummvm-git-logs
mailing list