From 7edd841078d474cd15685f6446ba09edadddd403 Mon Sep 17 00:00:00 2001 From: zher52 Date: Thu, 30 Apr 2020 20:25:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=99=9A=E6=8B=9F=E6=8C=89?= =?UTF-8?q?=E9=94=AE=E8=83=8C=E6=99=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/android/SplashScreen.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/android/SplashScreen.java b/src/android/SplashScreen.java index b80e7ee..82022f6 100644 --- a/src/android/SplashScreen.java +++ b/src/android/SplashScreen.java @@ -27,6 +27,7 @@ import android.content.res.Configuration; import android.content.res.ColorStateList; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; +import android.os.Build; import android.os.Handler; import android.view.Display; import android.view.Gravity; @@ -219,7 +220,14 @@ public class SplashScreen extends CordovaPlugin { private void removeSplashScreen(final boolean forceHideImmediately) { cordova.getActivity().runOnUiThread(new Runnable() { public void run() { - if (splashDialog != null && splashImageView != null && splashDialog.isShowing()) {//check for non-null splashImageView, see https://issues.apache.org/jira/browse/CB-12277 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + int color = Color.parseColor("#f8f8f9"); + float[] hsv = new float[3]; + Color.colorToHSV(color, hsv); + hsv[2] = 0.5f; + cordova.getActivity().getWindow().setNavigationBarColor(Color.HSVToColor(hsv)); + } + if (splashDialog != null && splashImageView != null && splashDialog.isShowing()) {//check for non-null splashImageView, see https://issues.apache.org/jira/browse/CB-12277 final int fadeSplashScreenDuration = getFadeDuration(); // CB-10692 If the plugin is being paused/destroyed, skip the fading and hide it immediately if (fadeSplashScreenDuration > 0 && forceHideImmediately == false) {