Mercurial > repos > blastem
diff android/src/com/retrodev/blastem/BlastEmActivity.java @ 893:4f46b4cd5035
Use immersive fullscreen when available. Updated manifest to theoretically support Android TV.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 22 Nov 2015 14:43:51 -0800 |
parents | 9f1c76714f87 |
children |
line wrap: on
line diff
--- a/android/src/com/retrodev/blastem/BlastEmActivity.java Sun Nov 22 14:42:36 2015 -0800 +++ b/android/src/com/retrodev/blastem/BlastEmActivity.java Sun Nov 22 14:43:51 2015 -0800 @@ -1,6 +1,22 @@ package com.retrodev.blastem; import org.libsdl.app.SDLActivity; +import android.os.Build; +import android.os.Bundle; +import android.view.View; + public class BlastEmActivity extends SDLActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + //set immersive mode on devices that support it + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + View blah = mSurface; + blah.setSystemUiVisibility( + View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY + ); + } + } } \ No newline at end of file