在webview中,我们需要获取网站的favicon.ico图标,但是默认状态下,WebChromeClient中的onReceivedIcon方法获取到的icon总是为null;
webview.getFavicon();获得到的还是null,这个就奇怪了,于是
经过一番google,发现老外也遇到了这个问题.
=======================================================
http://stackoverflow.com/questions/3462582/display-the-android-webviews-favicon
I'd like to display the favicon of the website I am accessing via the android.webkit.WebView. I've tried two ways to get it:
1) WebViewClient.onPageStarted()
method has a favicon parameter that is always null.
2) WebChromeClient.onReceivedIcon()
method