Android code for pinch zoom for webview

pinch zoom in android

pinch zoom in webview


I have webview1 which is assigned to ourSite variable

WebView ourSite = (WebView) findViewById(R.id.webView1);

add following code for pinch zoom in webview

ourSite.getSettings().setSupportZoom(true);
ourSite.getSettings().setBuiltInZoomControls(true);


Import header file

// for getSetting
import android.webkit.WebSettings;

//for webview
import android.webkit.WebView;

One Comment

Add your comments here

Back to Top