use of com.ferg.awfulapp.webview.LoggingWebChromeClient in project Awful.apk by Awful.
the class ThreadDisplayFragment method initThreadViewProperties.
private void initThreadViewProperties() {
if (mThreadView == null) {
Timber.w("initThreadViewProperties called for null WebView");
return;
}
mThreadView.setWebViewClient(threadWebViewClient);
mThreadView.setWebChromeClient(new LoggingWebChromeClient() {
@Override
public void onProgressChanged(WebView view, int newProgress) {
super.onProgressChanged(view, newProgress);
// second half of progress bar
setProgress(newProgress / 2 + 50);
}
});
mThreadView.setJavascriptHandler(clickInterface);
refreshSessionCookie();
mThreadView.setContent(getBlankPage());
mThreadView.setDownloadListener(new DownloadListener() {
@Override
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) {
enqueueDownload(Uri.parse(url));
}
});
}
Aggregations