Adding the TitleBar pull request

This commit is contained in:
Joe Bowser 2012-06-15 11:28:42 -07:00
commit dde79c14f5

View File

@ -256,9 +256,17 @@ public class DroidGap extends Activity implements CordovaInterface {
LOG.d(TAG, "DroidGap.onCreate()"); LOG.d(TAG, "DroidGap.onCreate()");
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_NO_TITLE); if (!preferences.prefMatches("showTitle", "true")) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, getWindow().requestFeature(Window.FEATURE_NO_TITLE);
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); }
if (preferences.prefMatches("fullscreen","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! // This builds the view. We could probably get away with NOT having a LinearLayout, but I like having a bucket!
Display display = getWindowManager().getDefaultDisplay(); Display display = getWindowManager().getDefaultDisplay();