Skip to content

Commit

Permalink
Fixing zoom issue in child browser
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst authored and Jesse MacFadyen committed Oct 20, 2011
1 parent b97551f commit f3fdae6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,16 @@ public void onClick(View v) {

webview = new WebView(ctx);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setBuiltInZoomControls(true);
WebViewClient client = new ChildBrowserClient(ctx, edittext);
webview.setWebViewClient(client);
webview.loadUrl(url);
webview.setId(5);
webview.setInitialScale(0);
webview.setLayoutParams(wvParams);
webview.requestFocus();
webview.requestFocusFromTouch();


toolbar.addView(back);
toolbar.addView(forward);
Expand Down Expand Up @@ -371,7 +375,7 @@ public ChildBrowserClient(PhonegapActivity mContext, EditText mEditText) {
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
String newloc;
if (url.startsWith("http")) {
if (url.startsWith("http:")) {
newloc = url;
} else {
newloc = "http://" + url;
Expand Down

0 comments on commit f3fdae6

Please sign in to comment.