diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-07-06 11:45:18 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-07-06 11:48:46 -0700 |
commit | 2245fa23796fe6243521f0dff172a39a62bff54c (patch) | |
tree | a9717156006f1ddab636e35cc8232b9a2699290f /src/com/android/launcher3/Folder.java | |
parent | 2598d3ce5b7571e3e781a77da7bee8f7f224f294 (diff) | |
download | android_packages_apps_Trebuchet-2245fa23796fe6243521f0dff172a39a62bff54c.tar.gz android_packages_apps_Trebuchet-2245fa23796fe6243521f0dff172a39a62bff54c.tar.bz2 android_packages_apps_Trebuchet-2245fa23796fe6243521f0dff172a39a62bff54c.zip |
Using background outline provider as the final provider for reveal animation
> When two animations are running simultaneously, getOutlineProvider does not
give the correct provider
Bug: 22166935
Change-Id: I54c9bcd8cf42dd130949ea98e87c77389c02d00f
Diffstat (limited to 'src/com/android/launcher3/Folder.java')
-rw-r--r-- | src/com/android/launcher3/Folder.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 85f58a1b1..476ebd12e 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -58,6 +58,7 @@ import com.android.launcher3.UninstallDropTarget.UninstallSource; import com.android.launcher3.Workspace.ItemOperator; import com.android.launcher3.accessibility.LauncherAccessibilityDelegate.AccessibilityDragSource; import com.android.launcher3.util.Thunk; +import com.android.launcher3.util.UiThreadCircularReveal; import java.util.ArrayList; import java.util.Collections; @@ -467,6 +468,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList prepareReveal(); centerAboutIcon(); + AnimatorSet anim = LauncherAnimUtils.createAnimatorSet(); int width = getPaddingLeft() + getPaddingRight() + mContent.getDesiredWidth(); int height = getFolderHeight(); @@ -477,7 +479,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList PropertyValuesHolder tx = PropertyValuesHolder.ofFloat("translationX", transX, 0); PropertyValuesHolder ty = PropertyValuesHolder.ofFloat("translationY", transY, 0); - Animator drift = LauncherAnimUtils.ofPropertyValuesHolder(this, tx, ty); + Animator drift = ObjectAnimator.ofPropertyValuesHolder(this, tx, ty); drift.setDuration(mMaterialExpandDuration); drift.setStartDelay(mMaterialExpandStagger); drift.setInterpolator(new LogDecelerateInterpolator(100, 0)); @@ -486,20 +488,19 @@ 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); - AnimatorSet anim = LauncherAnimUtils.createAnimatorSet(); - Animator reveal = LauncherAnimUtils.createCircularReveal(this, (int) getPivotX(), + Animator reveal = UiThreadCircularReveal.createCircularReveal(this, (int) getPivotX(), (int) getPivotY(), 0, radius); reveal.setDuration(mMaterialExpandDuration); reveal.setInterpolator(new LogDecelerateInterpolator(100, 0)); mContentWrapper.setAlpha(0f); - Animator iconsAlpha = LauncherAnimUtils.ofFloat(mContentWrapper, "alpha", 0f, 1f); + Animator iconsAlpha = ObjectAnimator.ofFloat(mContentWrapper, "alpha", 0f, 1f); iconsAlpha.setDuration(mMaterialExpandDuration); iconsAlpha.setStartDelay(mMaterialExpandStagger); iconsAlpha.setInterpolator(new AccelerateInterpolator(1.5f)); mFooter.setAlpha(0f); - Animator textAlpha = LauncherAnimUtils.ofFloat(mFooter, "alpha", 0f, 1f); + Animator textAlpha = ObjectAnimator.ofFloat(mFooter, "alpha", 0f, 1f); textAlpha.setDuration(mMaterialExpandDuration); textAlpha.setStartDelay(mMaterialExpandStagger); textAlpha.setInterpolator(new AccelerateInterpolator(1.5f)); |