WarrenFaith
WarrenFaith

Reputation: 57672

disabled built in zoom controls disable pinch zoom, too

I have a WebView which should support zoom. The UI design requires custom zoom controls and therefore I disabled the built in zoom controls. The problem now, the pinch zoom is disabled, too. Setting the built in controls enables the pinch zoom.

final WebSettings settings = mWebView.getSettings();
settings.setBuiltInZoomControls(false); // disables the pinch zoom, too
settings.setSupportZoom(true);

Does someone know a solution to disable/hide the built in controls and keep the pinch zoom?

Upvotes: 2

Views: 1715

Answers (1)

Labeeb Panampullan
Labeeb Panampullan

Reputation: 34823

Yes there is a function setDisplayZoomControls,
Sets whether the on screen zoom buttons are used. A combination of built in zoom controls enabled and on screen zoom controls disabled allows for pinch to zoom to work without the on screen controls

NOTE: Since API Level 11 only:(

Upvotes: 2

Related Questions