diff --git a/quickstep/res/color-night/quick_switch_view_background.xml b/quickstep/res/color-night/quick_switch_view_background.xml new file mode 100644 index 0000000000..7280918645 --- /dev/null +++ b/quickstep/res/color-night/quick_switch_view_background.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/quickstep/res/color/quick_switch_view_background.xml b/quickstep/res/color/quick_switch_view_background.xml new file mode 100644 index 0000000000..0eb2a6b915 --- /dev/null +++ b/quickstep/res/color/quick_switch_view_background.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/quickstep/res/drawable/keyboard_quick_switch_overview_button_background.xml b/quickstep/res/drawable/keyboard_quick_switch_overview_button_background.xml index 15843af154..2a4f0872e3 100644 --- a/quickstep/res/drawable/keyboard_quick_switch_overview_button_background.xml +++ b/quickstep/res/drawable/keyboard_quick_switch_overview_button_background.xml @@ -17,6 +17,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:shape="rectangle"> - + diff --git a/quickstep/res/drawable/keyboard_quick_switch_view_background.xml b/quickstep/res/drawable/keyboard_quick_switch_view_background.xml index 19aaed46b0..573c93ac1d 100644 --- a/quickstep/res/drawable/keyboard_quick_switch_view_background.xml +++ b/quickstep/res/drawable/keyboard_quick_switch_view_background.xml @@ -16,6 +16,6 @@ - + diff --git a/quickstep/res/layout-land/keyboard_quick_switch_taskview.xml b/quickstep/res/layout-land/keyboard_quick_switch_taskview.xml index 174a70459b..ebcbdcd2f2 100644 --- a/quickstep/res/layout-land/keyboard_quick_switch_taskview.xml +++ b/quickstep/res/layout-land/keyboard_quick_switch_taskview.xml @@ -23,7 +23,7 @@ android:importantForAccessibility="yes" android:background="@drawable/keyboard_quick_switch_task_view_background" android:clipToOutline="true" - launcher:borderColor="?androidprv:attr/materialColorSecondaryContainer"> + launcher:borderColor="?androidprv:attr/materialColorOutline"> + launcher:borderColor="?androidprv:attr/materialColorOutline"> + launcher:borderColor="?androidprv:attr/materialColorOutline"> + launcher:borderColor="?androidprv:attr/materialColorOutline"> + launcher:borderColor="?androidprv:attr/materialColorOutline"> + launcher:borderColor="?androidprv:attr/materialColorOutline"> - + diff --git a/quickstep/src/com/android/quickstep/util/BorderAnimator.java b/quickstep/src/com/android/quickstep/util/BorderAnimator.java index 1f1c15bdb8..c30661c42c 100644 --- a/quickstep/src/com/android/quickstep/util/BorderAnimator.java +++ b/quickstep/src/com/android/quickstep/util/BorderAnimator.java @@ -26,7 +26,6 @@ import android.view.animation.Interpolator; import androidx.annotation.NonNull; import androidx.annotation.Px; -import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatedFloat; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.Interpolators; @@ -61,7 +60,7 @@ public final class BorderAnimator { @NonNull private final Interpolator mInterpolator; @NonNull private final Paint mBorderPaint = new Paint(Paint.ANTI_ALIAS_FLAG); - private int mAlignmentAdjustment; + private float mAlignmentAdjustment; @Nullable private Animator mRunningBorderAnimation; @@ -106,16 +105,12 @@ public final class BorderAnimator { private void updateOutline() { float interpolatedProgress = mInterpolator.getInterpolation( mBorderAnimationProgress.value); - mAlignmentAdjustment = (int) Utilities.mapBoundToRange( - mBorderAnimationProgress.value, - /* lowerBound= */ 0f, - /* upperBound= */ 1f, - /* toMin= */ 0f, - /* toMax= */ (float) (mBorderWidthPx / 2f), - mInterpolator); + float borderWidth = mBorderWidthPx * interpolatedProgress; + // Inset the border by half the width to create an inwards-growth animation + mAlignmentAdjustment = borderWidth / 2f; mBorderPaint.setAlpha(Math.round(255 * interpolatedProgress)); - mBorderPaint.setStrokeWidth(Math.round(mBorderWidthPx * interpolatedProgress)); + mBorderPaint.setStrokeWidth(borderWidth); mInvalidateViewCallback.run(); }