Merge pull request #613 from muzuiget/immersive

(Android) Implement immersive mode on Kitkat
This commit is contained in:
Twinaphex 2014-03-17 17:01:52 +01:00
commit e09d99f0af
2 changed files with 29 additions and 3 deletions

View File

@ -5,7 +5,7 @@
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-sdk
android:minSdkVersion="9"
android:minSdkVersion="11"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

View File

@ -1,5 +1,31 @@
package com.retroarch.browser.retroactivity;
public final class RetroActivityFuture extends RetroActivityCamera
{
import android.view.View;
public final class RetroActivityFuture extends RetroActivityCamera {
@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);
}
}
}