Loading quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java +4 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,9 @@ import android.content.Context; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.allapps.AllAppsContainerView; import com.android.launcher3.util.Themes; /** * Definition for AllApps state Loading Loading @@ -92,7 +94,7 @@ public class AllAppsState extends LauncherState { } @Override public float getWorkspaceScrimAlpha(Launcher launcher) { return 1; public int getWorkspaceScrimColor(Launcher launcher) { return Themes.getAttrColor(launcher, R.attr.allAppsScrimColor); } } quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +3 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.Workspace; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.util.Themes; import com.android.quickstep.SysUINavigationMode; import com.android.quickstep.util.LayoutUtils; import com.android.quickstep.views.RecentsView; Loading Loading @@ -108,8 +109,8 @@ public class OverviewState extends LauncherState { } @Override public float getWorkspaceScrimAlpha(Launcher launcher) { return 1f; public int getWorkspaceScrimColor(Launcher launcher) { return Themes.getAttrColor(launcher, R.attr.overviewScrimColor); } @Override Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java +5 −5 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR; import static com.android.launcher3.LauncherAnimUtils.newCancelListener; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.HINT_STATE; Loading Loading @@ -127,11 +127,11 @@ public class NoButtonNavbarToOverviewTouchController extends PortraitStatesTouch } if (mFromState == NORMAL && mToState == HINT_STATE) { mNormalToHintOverviewScrimAnimator = ObjectAnimator.ofFloat( mNormalToHintOverviewScrimAnimator = ObjectAnimator.ofArgb( mLauncher.getScrimView(), VIEW_ALPHA, mFromState.getWorkspaceScrimAlpha(mLauncher), mToState.getWorkspaceScrimAlpha(mLauncher)); VIEW_BACKGROUND_COLOR, mFromState.getWorkspaceScrimColor(mLauncher), mToState.getWorkspaceScrimColor(mLauncher)); } mStartedOverview = false; mReachedOverview = false; Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +2 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.LauncherAnimUtils.newCancelListener; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; Loading Loading @@ -232,8 +231,8 @@ public class NoButtonQuickSwitchTouchController implements TouchController, // - OverviewScrim PendingAnimation xAnim = new PendingAnimation((long) (mXRange * 2)); xAnim.setFloat(mRecentsView, ADJACENT_PAGE_OFFSET, scaleAndOffset[1], LINEAR); xAnim.setFloat(mLauncher.getScrimView(), VIEW_ALPHA, toState.getWorkspaceScrimAlpha(mLauncher), LINEAR); xAnim.setViewBackgroundColor(mLauncher.getScrimView(), toState.getWorkspaceScrimColor(mLauncher), LINEAR); mXOverviewAnim = xAnim.createPlaybackController(); mXOverviewAnim.dispatchOnStart(); Loading res/color-v31/overview_scrim.xml 0 → 100644 +18 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="@android:color/system_neutral2_500" android:lStar="87" /> </selector> Loading
quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java +4 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,9 @@ import android.content.Context; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.allapps.AllAppsContainerView; import com.android.launcher3.util.Themes; /** * Definition for AllApps state Loading Loading @@ -92,7 +94,7 @@ public class AllAppsState extends LauncherState { } @Override public float getWorkspaceScrimAlpha(Launcher launcher) { return 1; public int getWorkspaceScrimColor(Launcher launcher) { return Themes.getAttrColor(launcher, R.attr.allAppsScrimColor); } }
quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +3 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.Workspace; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.util.Themes; import com.android.quickstep.SysUINavigationMode; import com.android.quickstep.util.LayoutUtils; import com.android.quickstep.views.RecentsView; Loading Loading @@ -108,8 +109,8 @@ public class OverviewState extends LauncherState { } @Override public float getWorkspaceScrimAlpha(Launcher launcher) { return 1f; public int getWorkspaceScrimColor(Launcher launcher) { return Themes.getAttrColor(launcher, R.attr.overviewScrimColor); } @Override Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java +5 −5 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR; import static com.android.launcher3.LauncherAnimUtils.newCancelListener; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.HINT_STATE; Loading Loading @@ -127,11 +127,11 @@ public class NoButtonNavbarToOverviewTouchController extends PortraitStatesTouch } if (mFromState == NORMAL && mToState == HINT_STATE) { mNormalToHintOverviewScrimAnimator = ObjectAnimator.ofFloat( mNormalToHintOverviewScrimAnimator = ObjectAnimator.ofArgb( mLauncher.getScrimView(), VIEW_ALPHA, mFromState.getWorkspaceScrimAlpha(mLauncher), mToState.getWorkspaceScrimAlpha(mLauncher)); VIEW_BACKGROUND_COLOR, mFromState.getWorkspaceScrimColor(mLauncher), mToState.getWorkspaceScrimColor(mLauncher)); } mStartedOverview = false; mReachedOverview = false; Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +2 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.LauncherAnimUtils.newCancelListener; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; Loading Loading @@ -232,8 +231,8 @@ public class NoButtonQuickSwitchTouchController implements TouchController, // - OverviewScrim PendingAnimation xAnim = new PendingAnimation((long) (mXRange * 2)); xAnim.setFloat(mRecentsView, ADJACENT_PAGE_OFFSET, scaleAndOffset[1], LINEAR); xAnim.setFloat(mLauncher.getScrimView(), VIEW_ALPHA, toState.getWorkspaceScrimAlpha(mLauncher), LINEAR); xAnim.setViewBackgroundColor(mLauncher.getScrimView(), toState.getWorkspaceScrimColor(mLauncher), LINEAR); mXOverviewAnim = xAnim.createPlaybackController(); mXOverviewAnim.dispatchOnStart(); Loading
res/color-v31/overview_scrim.xml 0 → 100644 +18 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="@android:color/system_neutral2_500" android:lStar="87" /> </selector>