From 71ea25f40aabca3929e48b7f58e3810bb745e0de Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Fri, 25 Nov 2011 14:31:53 -0800 Subject: [PATCH] Fixing scale, setting legacy scale --- framework/src/com/phonegap/DroidGap.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index 276ac87d..af2762bb 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"); } }