处理虚拟按键背景问题
This commit is contained in:
parent
94631e171a
commit
7edd841078
@ -27,6 +27,7 @@ import android.content.res.Configuration;
|
|||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
@ -219,6 +220,13 @@ public class SplashScreen extends CordovaPlugin {
|
|||||||
private void removeSplashScreen(final boolean forceHideImmediately) {
|
private void removeSplashScreen(final boolean forceHideImmediately) {
|
||||||
cordova.getActivity().runOnUiThread(new Runnable() {
|
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
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
|
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();
|
final int fadeSplashScreenDuration = getFadeDuration();
|
||||||
// CB-10692 If the plugin is being paused/destroyed, skip the fading and hide it immediately
|
// CB-10692 If the plugin is being paused/destroyed, skip the fading and hide it immediately
|
||||||
|
Loading…
x
Reference in New Issue
Block a user