0

I am trying the following code but it does not open the page in the desired way I want. It opens the URL in a mobile type page even with this code. I want the page to open completely zoomed out. I mean I want to see the full page instead of scrolling it. here's the code

 browser = (WebView) findViewById(R.id.browserview);
            browser.getSettings().setJavaScriptEnabled(true);
            browser.getSettings().setLoadWithOverviewMode(true);
            browser.getSettings().setUseWideViewPort(true);

appreciating help. thanks

  • I tried like browser.loadurl(http://www.mybringback.com – Saad Zaheer Feb 14 '14 at 09:40
  • I think this Might Help you to get your Answer !!! [Zoom Controlls][1] and [Control Zoom in webView][2] [1]: http://stackoverflow.com/questions/14438369/how-to-show-builtin-zoom-controlls-in-webview-in-android [2]: http://stackoverflow.com/questions/8049343/how-to-control-zoom-in-webview – Nayan Rath Feb 14 '14 at 09:44
  • I don't want any zoom controls. Just the page to be zoomed out so I can fully see it. That stuff is too complicated for me, I am a beginner – Saad Zaheer Feb 14 '14 at 09:50

1 Answers1

1

Add these following lines it will works.

String userAgent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/20100101 Firefox/4.0";
browser.getSettings().setUserAgentString(userAgent);
Shahinoor Shahin
  • 685
  • 3
  • 14
  • Hey shahinoor, I am sorry but your code worked for me. Can you explain it to me a little bit as I am a beginner. – Saad Zaheer Feb 18 '14 at 07:11