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.
This commit is contained in:
Darryl Pogue 2012-06-12 10:03:50 -07:00
parent 22e5ccfed4
commit 80ee6c1a91

View File

@ -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,