From ceabaf1e37f63ca95f6623e8aa96761c90f44faf Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Fri, 23 Apr 2010 15:08:15 -0700 Subject: [PATCH] Fixing the WebViewClient so we view pages in PhoneGap --- framework/src/com/phonegap/DroidGap.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index 776f5ab1..43c5b0a8 100644 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -116,7 +116,8 @@ public class DroidGap extends Activity { if(cupcakeStorage != null) cupcakeStorage.setStorage(appPackage); - root.addView(appView); + root.addView(appView); + setContentView(root); } @@ -175,6 +176,12 @@ public class DroidGap extends Activity { mCtx = ctx; } + public boolean shouldOverrideUrlLoading(WebView view, String url) { + view.loadUrl(url); + return true; + } + + @Override public boolean onJsAlert(WebView view, String url, String message, JsResult result) { Log.d(LOG_TAG, message);