aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Browet <koying@semperpax.com>2014-01-11 04:16:37 -0800
committerChris Browet <koying@semperpax.com>2014-01-11 04:16:37 -0800
commitca3016b4636d1c739de037aa14df0a150bd3701c (patch)
treeda3eca034d89ca3d258933f6228359873de249c3 /tools
parent76b38371ecd4438e4e8e4d94c5e75d5aa1e7d8c7 (diff)
parentd69634359129c300a25812fb04b21bdd3a8202a3 (diff)
Merge pull request #3712 from koying/adddroidimmersive
ADD: [droid] implement immersive mode on kitkat
Diffstat (limited to 'tools')
-rw-r--r--tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java
index 35ad6084ed..43e6117ce7 100644
--- a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java
+++ b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java
@@ -4,6 +4,7 @@ import android.app.NativeActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
+import android.view.View;
public class Main extends NativeActivity
{
@@ -31,4 +32,30 @@ public class Main extends NativeActivity
}
}
+ @Override
+ public void onResume()
+ {
+ super.onResume();
+
+ if (android.os.Build.VERSION.SDK_INT >= 19) {
+ // Immersive mode
+
+ // Constants from API > 14
+ final int API_SYSTEM_UI_FLAG_LAYOUT_STABLE = 0x00000100;
+ final int API_SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION = 0x00000200;
+ final int API_SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN = 0x00000400;
+ final int API_SYSTEM_UI_FLAG_FULLSCREEN = 0x00000004;
+ final int API_SYSTEM_UI_FLAG_IMMERSIVE_STICKY = 0x00001000;
+
+ View thisView = getWindow().getDecorView();
+ thisView.setSystemUiVisibility(
+ API_SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | API_SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ | API_SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ | API_SYSTEM_UI_FLAG_FULLSCREEN
+ | API_SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
+ }
+ }
+
}