Add "wave" animation when entering taskbar edu
Each icon scales and translates up, then back down. If the icon is predicted, it also plays a "slot machine" animation through random icons from AllAppsList. Test: Visual Bug: 180605356 Change-Id: Ia41cb0e340347eea6b580d23c8a2386837e9c399
This commit is contained in:
1 parent
8e0484bf69
commit
31f787d352
8 files changed
+181
-4
No files matched your search
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.android.launcher3.taskbar;
|
||||
|
||||
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
|
||||
import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE;
|
||||
|
||||
import android.animation.PropertyValuesHolder;
|
||||
import android.content.Context;
|
||||
@@ -33,6 +33,7 @@ import com.android.launcher3.views.AbstractSlideInView;
|
||||
public class TaskbarEduView extends AbstractSlideInView<TaskbarActivityContext>
|
||||
implements Insettable {
|
||||
|
||||
private static final int DEFAULT_OPEN_DURATION = 500;
|
||||
private static final int DEFAULT_CLOSE_DURATION = 200;
|
||||
|
||||
private final Rect mInsets = new Rect();
|
||||
@@ -129,8 +130,8 @@ public class TaskbarEduView extends AbstractSlideInView<TaskbarActivityContext>
|
||||
mIsOpen = true;
|
||||
mOpenCloseAnimator.setValues(
|
||||
PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED));
|
||||
mOpenCloseAnimator.setInterpolator(FAST_OUT_SLOW_IN);
|
||||
mOpenCloseAnimator.start();
|
||||
mOpenCloseAnimator.setInterpolator(AGGRESSIVE_EASE);
|
||||
mOpenCloseAnimator.setDuration(DEFAULT_OPEN_DURATION).start();
|
||||
}
|
||||
|
||||
void snapToPage(int page) {
|
||||
|
||||
Reference in new issue
Block a user