Академический Документы
Профессиональный Документы
Культура Документы
Stack Overflow
log in
57
android
webview
The default Browser app for Android shows zoom controls when you're scrolling and also allows for pinch zooming. How can I enable this feature for my
own Webview?
I've tried:
webSettings.setBuiltInZoomControls(true);
webSettings.setSupportZoom(true);
but neither of the features get enabled as a result. Btw I've set a WebChromeClient and a WebViewClient for the Webview if that makes a difference.
Thanks!
share
Asked
Aug 19 '11 at 11:44
Vivek Kalkur
1,638 2 12 34
Edited
Dec 13 '11 at 13:08
3 Answers
153
Order By
Votes
16
Answered
Aug 24 '11 at 7:53
While this will allow pinch-to-zoom, it will also display a zoom overlay control (Galaxy S3). In order to disable the on-screen zoom tool, but retain the pinch-to-zoom functionality, you
need to call webView.setDisplayZoomControls(false) as well. Lev Nov 6 '14 at 9:38
^ webView.getSettings().setDisplayZoomControls(false); wiseindy Apr 18 '15 at 18:26
add a comment
11
share
Answered
Sep 2 '13 at 4:56
Use these:
wv.getSettings().setBuiltInZoomControls(true);
wv.getSettings().setDisplayZoomControls(false);
share
Dario Bruzzese
261 4 7
Answered
Sep 15 '15 at 13:12
plus 1, for the answer.. helped me. Akshatha Srinivas Jun 13 at 12:42
add a comment
Your Answer
log in
or
Name
By posting your answer, you agree to the privacy policy and terms of service.
meta chat tour help blog privacy policy legal contact us full site
Download the Stack Exchange Android app
2016 Stack Exchange, Inc