From 32b6932010671d2ac757b84b5f77eed828ca9bce Mon Sep 17 00:00:00 2001 From: cgspine Date: Mon, 10 Jan 2022 21:50:57 +0800 Subject: [PATCH] bugfix: SwipeBackgroundView flag. --- .../java/com/qmuiteam/qmui/arch/SwipeBackgroundView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackgroundView.java b/arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackgroundView.java index d0dde360..7bea6782 100644 --- a/arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackgroundView.java +++ b/arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackgroundView.java @@ -36,7 +36,7 @@ import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; -class SwipeBackgroundView extends View { +public class SwipeBackgroundView extends View { private ArrayList mViewWeakReference; private boolean mDoRotate = false; @@ -188,7 +188,9 @@ class SwipeBackgroundView extends View { if (isMain || lp == null) { view.draw(canvas); } else { - canvas.drawColor(QMUIColorHelper.setColorAlpha(Color.BLACK, lp.dimAmount)); + if((lp.flags & WindowManager.LayoutParams.FLAG_DIM_BEHIND) != 0){ + canvas.drawColor(QMUIColorHelper.setColorAlpha(Color.BLACK, lp.dimAmount)); + } view.getLocationOnScreen(tempLocations); canvas.translate(tempLocations[0], tempLocations[1]); view.draw(canvas);