Adding more undocumented features for app title bar and full-screen

This commit is contained in:
Joe Bowser 2012-06-15 15:16:14 -07:00
parent 07ed6daeda
commit ee0cd679d3

View File

@ -256,9 +256,21 @@ public class DroidGap extends Activity implements CordovaInterface {
LOG.d(TAG, "DroidGap.onCreate()");
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,
if(this.getBooleanProperty("showTitle", true))
{
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
}
if(this.getBooleanProperty("setFullscreen", 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();