Android saves an example of a picture in WebView

preface

If there is a need in the project, long press the image in the WebView of the app to save it. Later, I went to study how to realize it and sorted it out by the way.

WebView basic configuration

mWvContent.getSettings().setJavaScriptEnabled(true);
mWvContent.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWvContent.getSettings().setDomStorageEnabled(false);
mWvContent.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
// 自适应屏幕
mWvContent.getSettings().setUseWideViewPort(true);
mWvContent.getSettings().setLoadWithOverviewmode(true);

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>