如果外部页面关闭,则刷新网页视图 [英] Refresh webview if external page closed

查看:80
本文介绍了如果外部页面关闭,则刷新网页视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果外部页面关闭,我想刷新Web视图 这是webview所在的片段的代码:

I want to make the web-view refresh if the external page is closed Here is the code of the fragment where the webview is :

public boolean shouldOverrideUrlLoading(WebView view, String url) {   
	        	
	        	if(url.contains("ex03"))
	        	{ 

	        		view.getContext().startActivity(
	                        new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
	                
	        		return true;
	        		
	        	} else {
	        		
	                view.loadUrl(url); 
	                return true;
	            }
	        	  
	        }
	        

推荐答案

关闭外部页面后,简单答案为webView.reload();

simple answer will be webView.reload(); after external page is closed

看看-> 此处

这篇关于如果外部页面关闭,则刷新网页视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆