You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/06/16 00:02:10 UTC
[4/5] android commit: Adding the TitleBar pull request
Adding the TitleBar pull request
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/dde79c14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/dde79c14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/dde79c14
Branch: refs/heads/master
Commit: dde79c14f5d784ed97fdb7345d3ecefe7219cc24
Parents: b08f245 80ee6c1
Author: Joe Bowser <bo...@apache.org>
Authored: Fri Jun 15 11:28:42 2012 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Fri Jun 15 11:28:42 2012 -0700
----------------------------------------------------------------------
framework/src/org/apache/cordova/DroidGap.java | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/dde79c14/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------
diff --cc framework/src/org/apache/cordova/DroidGap.java
index cf55dde,a47ac87..9b7454b
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@@ -256,15 -313,23 +256,23 @@@ public class DroidGap extends Activity
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);
+ if (!preferences.prefMatches("showTitle", "true")) {
+ getWindow().requestFeature(Window.FEATURE_NO_TITLE);
+ }
+
+ 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!
- Display display = getWindowManager().getDefaultDisplay();
+ Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
-
+
root = new LinearLayoutSoftKeyboardDetect(this, width, height);
root.setOrientation(LinearLayout.VERTICAL);
root.setBackgroundColor(this.backgroundColor);