Webview scale then to enable setUseWideViewPort without button
<p>Hi I have a WebView inside my LinearLayout and I'm using this WebView to zoom an image and override urls, at first I have a case to support different size screens, then I have a button in the bottom corner which invokes the zoom.  </p>

<p>The problem I am having now is, I am not using the zoom button anymore, I want the image to be scaled on entering the Activity to the proper size of screen and have <strong>the setUseWideViewPort</strong> which has the double tap function to zoom in/out to work right away, but I can't seem to get it to stay on the initial scale I set it at, the <strong>setUseWideViewPort</strong> widens out the screen and my image way too far.</p>

<p>How can I achieve this without a button for setUseWideViewPort="true"</p>

<p>here is my code</p>

<pre><code>private WebView myWebView;
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    this.myWebView = (WebView) this.findViewById(R.id.web1);

    //Support for diff screens
    DisplayMetrics metrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(metrics);

    switch (metrics.densityDpi) {
    case DisplayMetrics.DENSITY_HIGH:
        myWebView.setInitialScale(100);  
        break;

    case DisplayMetrics.DENSITY_MEDIUM:
        myWebView.setInitialScale(70);  
        break;

    case DisplayMetrics.DENSITY_LOW:
        myWebView.setInitialScale(50);  
        break;

    default:
        myWebView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.MEDIUM);
        break;
    }


    myWebView.loadUrl("file:///android_asset/test.html");
    //myWebView.getSettings().setJavaScriptEnabled(true);

    myWebView.setFocusable(false);
    myWebView.invokeZoomPicker();
    myWebView.getSettings().setBuiltInZoomControls(true);

    myWebView.getSettings().setLoadWithOverviewMode(true);
    myWebView.getSettings().setUseWideViewPort(true);


            //What I had initially for double tap to zoom in/out
    /*final ImageView zoomBtnEnable  = (ImageView) findViewById(R.id.zoom);  

    zoomBtnEnable.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //myWebView.getSettings().setJavaScriptEnabled(true);

    myWebView.setFocusable(false);
    myWebView.invokeZoomPicker();
    myWebView.getSettings().setBuiltInZoomControls(true);

    myWebView.getSettings().setLoadWithOverviewMode(true);
    myWebView.getSettings().setUseWideViewPort(true);
        }

    });*/

   }
</code></pre>

<p>I would appreciate if you could help me with this problem thanks</p>
