|
|
@ -23,6 +23,8 @@ import android.view.View; |
|
|
import android.view.ViewGroup; |
|
|
import android.view.ViewGroup; |
|
|
import android.view.animation.Animation; |
|
|
import android.view.animation.Animation; |
|
|
import android.view.animation.TranslateAnimation; |
|
|
import android.view.animation.TranslateAnimation; |
|
|
|
|
|
import android.webkit.ConsoleMessage; |
|
|
|
|
|
import android.webkit.WebChromeClient; |
|
|
import android.webkit.WebSettings; |
|
|
import android.webkit.WebSettings; |
|
|
import android.webkit.WebView; |
|
|
import android.webkit.WebView; |
|
|
import android.webkit.WebViewClient; |
|
|
import android.webkit.WebViewClient; |
|
|
@ -3797,6 +3799,14 @@ public class ViewScreenSaver extends ViewBase<ViewScreenSaverBinding> { |
|
|
webSettings.setDomStorageEnabled(true);//DOM Storage
|
|
|
webSettings.setDomStorageEnabled(true);//DOM Storage
|
|
|
webSettings.setDefaultTextEncodingName("utf-8"); |
|
|
webSettings.setDefaultTextEncodingName("utf-8"); |
|
|
mWebView.setWebViewClient(new WebViewClient()); |
|
|
mWebView.setWebViewClient(new WebViewClient()); |
|
|
|
|
|
mWebView.setWebChromeClient(new WebChromeClient() { |
|
|
|
|
|
public boolean onConsoleMessage(ConsoleMessage cm) { |
|
|
|
|
|
if(!cm.message().contains("THREE.WebGLRenderer:") && !cm.message().contains("Uncaught (in promise) AbortError")){ |
|
|
|
|
|
LoggerUtil.e("WebView日志",cm.message()); |
|
|
|
|
|
} |
|
|
|
|
|
return super.onConsoleMessage(cm); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
mWebView.loadUrl(url); |
|
|
mWebView.loadUrl(url); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|