4
votes

I set WebView with this initial values

    webview.getSettings().setBuiltInZoomControls(true);
    webview.getSettings().setLoadWithOverviewMode(true);
    webview.getSettings().setUseWideViewPort(true);

After the first loading, the web page shows as full page. If I load a new Url the new page shows with the last zoom settings. It is not loaded with the initial setting. How can I reset the last zoom settings to initial value before loading the next url?

3

3 Answers

5
votes

try to set these properties- webview.getSettings().setLoadWithOverviewMode(true); webview.setInitialScale(0);

0
votes

In Kotlin you wan try :

webview.settings.loadWithOverviewMode = true
webview.setInitialScale(0)
0
votes

In my app, testing on Android 8, I tried all the combinations of the previous answers. setInitialScale made no difference and only this reset the zoom level before a new load:

webView.getSettings().setLoadWithOverviewMode(false);
webView.getSettings().setLoadWithOverviewMode(true);