mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Update shortcut animations.
- Open animation: shortcuts reveal using modified circular reveal (so that it reveals in the pill shape instead of a circle); slight translation away from the original icon; scale icon and text. - Hover animation: scale the shortcut pill and translate others away. Bug: 28980830 Bug: 30127368 Change-Id: I8ed05c7a082f2c2a3f6c663da7259f6cd33e394f
This commit is contained in:
@@ -35,8 +35,8 @@ import android.view.animation.DecelerateInterpolator;
|
||||
import com.android.launcher3.allapps.AllAppsContainerView;
|
||||
import com.android.launcher3.allapps.AllAppsTransitionController;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.util.CircleRevealOutlineProvider;
|
||||
import com.android.launcher3.util.Thunk;
|
||||
import com.android.launcher3.util.UiThreadCircularReveal;
|
||||
import com.android.launcher3.widget.WidgetsContainerView;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -345,8 +345,8 @@ public class LauncherStateTransitionAnimation {
|
||||
float startRadius = pCb.getMaterialRevealViewStartFinalRadius();
|
||||
AnimatorListenerAdapter listener = pCb.getMaterialRevealViewAnimatorListener(
|
||||
revealView, buttonView);
|
||||
Animator reveal = UiThreadCircularReveal.createCircularReveal(revealView, width / 2,
|
||||
height / 2, startRadius, revealRadius);
|
||||
Animator reveal = new CircleRevealOutlineProvider(width / 2, height / 2,
|
||||
startRadius, revealRadius).createRevealAnimator(revealView);
|
||||
reveal.setDuration(revealDuration);
|
||||
reveal.setInterpolator(new LogDecelerateInterpolator(100, 0));
|
||||
if (listener != null) {
|
||||
@@ -789,8 +789,8 @@ public class LauncherStateTransitionAnimation {
|
||||
float finalRadius = pCb.getMaterialRevealViewStartFinalRadius();
|
||||
AnimatorListenerAdapter listener =
|
||||
pCb.getMaterialRevealViewAnimatorListener(revealView, buttonView);
|
||||
Animator reveal = UiThreadCircularReveal.createCircularReveal(revealView, width / 2,
|
||||
height / 2, revealRadius, finalRadius);
|
||||
Animator reveal = new CircleRevealOutlineProvider(width / 2, height / 2,
|
||||
revealRadius, finalRadius).createRevealAnimator(revealView);
|
||||
reveal.setInterpolator(new LogDecelerateInterpolator(100, 0));
|
||||
reveal.setDuration(revealDuration);
|
||||
reveal.setStartDelay(itemsAlphaStagger);
|
||||
|
||||
Reference in New Issue
Block a user