incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [5/10] git commit: Fixing scale, setting legacy scale
Date Fri, 06 Jan 2012 23:52:42 GMT
Fixing scale, setting legacy scale


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/71ea25f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/71ea25f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/71ea25f4

Branch: refs/heads/master
Commit: 71ea25f40aabca3929e48b7f58e3810bb745e0de
Parents: 7840448
Author: Joe Bowser <joe.bowser@nitobi.com>
Authored: Fri Nov 25 14:31:53 2011 -0800
Committer: Joe Bowser <joe.bowser@nitobi.com>
Committed: Fri Nov 25 14:38:11 2011 -0800

----------------------------------------------------------------------
 framework/src/com/phonegap/DroidGap.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/71ea25f4/framework/src/com/phonegap/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java
index 276ac87..af2762b 100755
--- a/framework/src/com/phonegap/DroidGap.java
+++ b/framework/src/com/phonegap/DroidGap.java
@@ -219,7 +219,7 @@ public class DroidGap extends PhonegapActivity {
     // when another application (activity) is started.
     protected boolean keepRunning = true;
 
-    private boolean clasicRender;
+    private boolean classicRender;
 
     /** 
      * Called when the activity is first created. 
@@ -283,9 +283,7 @@ public class DroidGap extends PhonegapActivity {
         this.setWebViewClient(this.appView, new GapViewClient(this));
 
         //14 is Ice Cream Sandwich!
-        if(android.os.Build.VERSION.SDK_INT < 14)
-            this.appView.setInitialScale(100);
-        else if(this.clasicRender)
+        if(android.os.Build.VERSION.SDK_INT < 14 && this.classicRender)
         {
             //This hack fixes legacy PhoneGap apps
             //We should be using real pixels, not pretend pixels
@@ -293,6 +291,10 @@ public class DroidGap extends PhonegapActivity {
             int initialScale = (int) (scale * 100);
             this.appView.setInitialScale(initialScale);
         }
+        else
+        {
+            this.appView.setInitialScale(0);
+        }
         this.appView.setVerticalScrollBarEnabled(false);
         this.appView.requestFocusFromTouch();
 
@@ -1766,7 +1768,7 @@ public class DroidGap extends PhonegapActivity {
                     String enabled = xml.getAttributeValue(null, "enabled");
                     if(enabled != null)
                     {
-                        this.clasicRender = enabled.equals("true");
+                        this.classicRender = enabled.equals("true");
                     }
                     
                 }


Mime
View raw message