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:
Tony Wickham committed 2016-07-19 13:58:51 -07:00
1 parent 1e3d490e08
commit 8f58e61d02
14 files changed
+378 -157

No files matched your search

+3 -3
View File
@@ -80,8 +80,8 @@ import com.android.launcher3.logging.UserEventDispatcher.LaunchSourceProvider;
import com.android.launcher3.pageindicators.PageIndicatorDots;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.CircleRevealOutlineProvider;
import com.android.launcher3.util.Thunk;
import com.android.launcher3.util.UiThreadCircularReveal;
import java.util.ArrayList;
import java.util.Collections;
@@ -554,8 +554,8 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
int ry = (int) Math.max(Math.max(height - getPivotY(), 0), getPivotY());
float radius = (float) Math.hypot(rx, ry);
Animator reveal = UiThreadCircularReveal.createCircularReveal(this, (int) getPivotX(),
(int) getPivotY(), 0, radius);
Animator reveal = new CircleRevealOutlineProvider((int) getPivotX(),
(int) getPivotY(), 0, radius).createRevealAnimator(this);
reveal.setDuration(mMaterialExpandDuration);
reveal.setInterpolator(new LogDecelerateInterpolator(100, 0));