diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index 2b92ef61..893471f8 100755 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -319,13 +319,25 @@ public class DroidGap extends PhonegapActivity { public void onCreate(Bundle savedInstanceState) { preferences = new PreferenceSet(); + // Load PhoneGap configuration: + // white list of allowed URLs + // debug setting + this.loadConfiguration(); + LOG.d(TAG, "DroidGap.onCreate()"); super.onCreate(savedInstanceState); - getWindow().requestFeature(Window.FEATURE_NO_TITLE); - getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, - WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); - // This builds the view. We could probably get away with NOT having a LinearLayout, but I like having a bucket! + getWindow().requestFeature(Window.FEATURE_NO_TITLE); + + if (preferences.pref("fullscreen").equals("true")) { + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, + WindowManager.LayoutParams.FLAG_FULLSCREEN); + } else { + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, + WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); + } + + // This builds the view. We could probably get away with NOT having a LinearLayout, but I like having a bucket! Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); @@ -335,11 +347,6 @@ public class DroidGap extends PhonegapActivity { root.setBackgroundColor(this.backgroundColor); root.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 0.0F)); - - // Load PhoneGap configuration: - // white list of allowed URLs - // debug setting - this.loadConfiguration(); // If url was passed in to intent, then init webview, which will load the url Bundle bundle = this.getIntent().getExtras();