kalpana c
kalpana c

Reputation: 2739

zoom in/out (+/-) in webview android

In my application I have one Webview and two buttons next and previous. First time load content from database after that I zoom my Webview and change the page using next button then display content but the zooming is stated.

So my question is that how I change a Webview in initial scale?

I used this:

web1.getSettings().setBuiltInZoomControls(true); 

and after click on next page used this:

web1.getSettings().setDefaultZoom(ZoomDensity.FAR);
web1.setInitialScale(100);

but no any effects.

Please help me.

Upvotes: 2

Views: 2583

Answers (1)

IronBlossom
IronBlossom

Reputation: 3917

Try using web1.getSettings().setLoadWithOverviewMode(true); and web1.getSettings().setUseWideViewPort(true);

Upvotes: 2

Related Questions