https://stackoverflow.com/questions/47547597/webview-in-oreo-not-working
Process: com.android.chrome:sandboxed_process0, PID: 16787 android.content.res.Resources$NotFoundException: Array resource ID #0x7f030010 at android.content.res.Resources.obtainTypedArray(Resources.java:617) at android.content.res.Resources.preloadFonts(Resources.java:379) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5815) at android.app.ActivityThread.-wrap1(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.WebViewZygoteInit.main(WebViewZygoteInit.java:121)
WebSettings settings = binding.landingWb.getSettings(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { settings.setSafeBrowsingEnabled(true); } //binding.loader.setVisibility(View.GONE); settings.setJavaScriptEnabled(true); binding.landingWb.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); binding.landingWb.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url != null) { if (url.startsWith("whatsapp://")) { view.getContext().startActivity( new Intent(Intent.ACTION_VIEW, Uri.parse(url))); return true; } else { view.loadUrl(url); return true; } } else { binding.loader.setVisibility(View.GONE); return false; } }
0 Coments:
Posting Komentar
Trimakasih,
Telah berkunjung di riodarmala.blogspot.com
Jangan lupa tinggalkan comments.