Merge "Fix bug where workspace alpha does not get set to 1 when animation gets cancelled." into sc-dev am: f9df8f3682

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15023032

Change-Id: Iaed06dd41e6932628f33b232ae9f77e2194e55a9
This commit is contained in:
Jonathan Miranda
2021-06-20 22:58:01 +00:00
committed by Automerger Merge Worker
2 changed files with 9 additions and 2 deletions

View File

@@ -497,8 +497,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
view -> viewsToAnimate.add(((CellLayout) view).getShortcutsAndWidgets()));
viewsToAnimate.add(mLauncher.getHotseat());
// Add QSB
viewsToAnimate.add(mLauncher.findViewById(R.id.search_container_all_apps));
viewsToAnimate.forEach(view -> {
view.setLayerType(View.LAYER_TYPE_HARDWARE, null);

View File

@@ -24,6 +24,7 @@ import static com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW;
import static com.android.launcher3.states.StateAnimationConfig.SKIP_SCRIM;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.view.View;
@@ -98,6 +99,14 @@ public class WorkspaceRevealAnim {
alpha.setDuration(DURATION_MS);
alpha.setInterpolator(Interpolators.DECELERATED_EASE);
mAnimators.play(alpha);
mAnimators.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
SCALE_PROPERTY.set(v, 1f);
v.setAlpha(1f);
}
});
}
/**