Android WebView 图片自适应屏幕宽度

只需要在onPageFinished 中调用  imgReset()方法

	@Override
		public void onPageFinished(WebView view, String url) {
			if (refreshableView.isRefreshing())
				refreshableView.finishRefresh();
			progressBar.setVisibility(View.INVISIBLE);
			imgReset();
			super.onPageFinished(view, url);
		}
	private void imgReset() {
		webView.loadUrl("javascript:(function(){" +
				"var objs = document.getElementsByTagName('img'); " +
				"for(var i=0;i

 

 

 

文章参考https://blog.csdn.net/smileiam/article/details/72123227

你可能感兴趣的:(Android)