From 80ee6c1a9184754bdf431cf45470747237b3b86c Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Tue, 12 Jun 2012 10:03:50 -0700 Subject: [PATCH] Support showing the app title bar through a preference. This does not change the default behaviour, and will only show the title bar when the showTitle preference is true. This allows apps to show and make use of the ActionBar in Android 3.x and 4.0. --- framework/src/org/apache/cordova/DroidGap.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index 5e2586d0..a47ac87d 100755 --- a/framework/src/org/apache/cordova/DroidGap.java +++ b/framework/src/org/apache/cordova/DroidGap.java @@ -313,7 +313,9 @@ public class DroidGap extends Activity implements CordovaInterface { LOG.d(TAG, "DroidGap.onCreate()"); super.onCreate(savedInstanceState); - getWindow().requestFeature(Window.FEATURE_NO_TITLE); + if (!preferences.prefMatches("showTitle", "true")) { + getWindow().requestFeature(Window.FEATURE_NO_TITLE); + } if (preferences.prefMatches("fullscreen","true")) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,