Android webView的shouldOverrideUrlLoading返回值的理解

280 阅读1分钟

shouldOverrideUrlLoading的返回值有两个,true和false,文档的解释很简单,是这样的:

 {@code true} to cancel the current load, otherwise return {@code false}.

理解是:如果你想阻止现在正在加载的url,比如你想加载别的页面,那么可以返回true,表明你想要阻止。否则返回false。