Roman Traversine
Roman Traversine

Reputation: 928

How to make a Zoom Control on WebView?

Good day.

I'm new @android programming. I use Eclipse. My question is, I've seen Zoom Control on left panel in layout. then I try to drag it (ZoomControl) to the layout. then I run my project. it shows the zoom control but I can't zoom in and zoom out the text on my webview. anyone can help me please ?

how to call it ? how to implement it ? I use webview for learning application, and it need zoom control to zoom in and zoom out the text on it.

thanks for your help :)

Upvotes: 0

Views: 1052

Answers (1)

DaoLQ
DaoLQ

Reputation: 988

You can try code below:

    mWebView.getSettings().setLoadWithOverviewMode(true);
    mWebView.getSettings().setUseWideViewPort(true);
    mWebView.getSettings().setBuiltInZoomControls(true);
    mWebView.getSettings().setDisplayZoomControls(false);

Upvotes: 2

Related Questions