Aniamte stashed handle color changes

Test: Swipe from light background to dark background, ensure handle animates the color change
Bug: 193938970
Change-Id: I815c3a364019935bdf3d69309e695ac34b119c5e
This commit is contained in:
Tony Wickham
2021-09-29 16:16:43 -07:00
parent 9a0d98f483
commit 0ede0fa405
2 changed files with 37 additions and 4 deletions

View File

@@ -70,7 +70,8 @@ public class StashedHandleViewController {
mPrefs = Utilities.getPrefs(mActivity);
mStashedHandleView = stashedHandleView;
mStashedHandleView.updateHandleColor(
mPrefs.getBoolean(SHARED_PREFS_STASHED_HANDLE_REGION_DARK_KEY, false));
mPrefs.getBoolean(SHARED_PREFS_STASHED_HANDLE_REGION_DARK_KEY, false),
false /* animate */);
final Resources resources = mActivity.getResources();
mStashedHandleWidth = resources.getDimensionPixelSize(R.dimen.taskbar_stashed_handle_width);
mStashedHandleHeight = resources.getDimensionPixelSize(
@@ -79,7 +80,7 @@ public class StashedHandleViewController {
new RegionSamplingHelper.SamplingCallback() {
@Override
public void onRegionDarknessChanged(boolean isRegionDark) {
mStashedHandleView.updateHandleColor(isRegionDark);
mStashedHandleView.updateHandleColor(isRegionDark, true /* animate */);
mPrefs.edit().putBoolean(SHARED_PREFS_STASHED_HANDLE_REGION_DARK_KEY,
isRegionDark).apply();
}