added ability for cordova activity to be viewed in a real full screen regardless of android version (as was the case in previous cordova versions)

This closes #279
This closes #218

PR #218 didn't cleanly merge
This commit is contained in:
Or Arnon 2016-03-17 10:29:43 +02:00 committed by Joe Bowser
parent ba5e3a81e0
commit 312872adaf

View File

@ -121,7 +121,9 @@ public class CordovaActivity extends Activity {
preferences.set("Fullscreen", true);
}
if (preferences.getBoolean("Fullscreen", false)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// NOTE: use the FullscreenNotImmersive configuration key to set the activity in a REAL full screen
// (as was the case in previous cordova versions)
if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) && !preferences.getBoolean("FullscreenNotImmersive", false)) {
immersiveMode = true;
} else {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,