package com.sebnarware.avalanche;

import android.os.Bundle;
import android.webkit.WebView;
import android.app.Activity;
import android.content.Intent;

public class WebViewActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
    	
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_view);
        
        // Get the desired url from the intent
        Intent intent = getIntent();
        String url = intent.getStringExtra(MainActivity.INTENT_EXTRA_WEB_VIEW_URL);
        
        // get the web view, and load the url
        WebView webView = (WebView) findViewById(R.id.webview);
        webView.getSettings().setBuiltInZoomControls(true);
        webView.loadUrl(url);
    }

}

@@ -85,16 +85,140 @@
 ebView;%0A
+import android.webkit.WebViewClient;%0Aimport android.webkit.WebSettings.ZoomDensity;%0Aimport android.annotation.SuppressLint;%0A
 import a
@@ -270,16 +270,54 @@
 ntent;%0A%0A
+@SuppressLint(%22SetJavaScriptEnabled%22)%0A
 public c
@@ -717,54 +717,8 @@
    %0A
-        // get the web view, and load the url%0A
     
@@ -789,59 +789,487 @@
     
-webView.getSettings().setBuiltInZoomControls(true);
+%0A        // set a reasonable zoom and view mode%0A        webView.getSettings().setUseWideViewPort(true);%0A        webView.getSettings().setDefaultZoom(ZoomDensity.FAR);%0A        webView.getSettings().setBuiltInZoomControls(true);%0A        %0A        // make link navigation stay within this webview, vs. launching the browser%0A        webView.setWebViewClient(new WebViewClient());%0A        %0A        // enable javascript%0A        webView.getSettings().setJavaScriptEnabled(true);%0A        
 %0A   

make webview work better