summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/graphics
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-10-26 15:36:10 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-10-26 16:38:55 -0700
commit5bc6b6f14c676e7528be62e1355a4dec3d783524 (patch)
tree4923c690c29907b54f8f27a444fe0c61bb78408a /src/com/android/launcher3/graphics
parentd4ece005e43a39af08a17acc9ad801729a5dc9d4 (diff)
downloadandroid_packages_apps_Trebuchet-5bc6b6f14c676e7528be62e1355a4dec3d783524.tar.gz
android_packages_apps_Trebuchet-5bc6b6f14c676e7528be62e1355a4dec3d783524.tar.bz2
android_packages_apps_Trebuchet-5bc6b6f14c676e7528be62e1355a4dec3d783524.zip
Consolidating various interpolators
Change-Id: I9588eee3552001b162a1e8d5ccefcfb44d221880
Diffstat (limited to 'src/com/android/launcher3/graphics')
-rw-r--r--src/com/android/launcher3/graphics/GradientView.java4
-rw-r--r--src/com/android/launcher3/graphics/PreloadIconDrawable.java5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/com/android/launcher3/graphics/GradientView.java b/src/com/android/launcher3/graphics/GradientView.java
index 5455b43ec..bacb06323 100644
--- a/src/com/android/launcher3/graphics/GradientView.java
+++ b/src/com/android/launcher3/graphics/GradientView.java
@@ -29,12 +29,12 @@ import android.support.v4.graphics.ColorUtils;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.View;
-import android.view.animation.AccelerateInterpolator;
import android.view.animation.Interpolator;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
+import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.dynamicui.WallpaperColorInfo;
import com.android.launcher3.util.Themes;
@@ -64,7 +64,7 @@ public class GradientView extends View implements WallpaperColorInfo.OnChangeLis
private final int mMaskHeight, mMaskWidth;
private final int mAlphaColors;
private final Paint mDebugPaint = DEBUG ? new Paint() : null;
- private final Interpolator mAccelerator = new AccelerateInterpolator();
+ private final Interpolator mAccelerator = Interpolators.ACCEL;
private final float mAlphaStart;
private final WallpaperColorInfo mWallpaperColorInfo;
private final int mScrimColor;
diff --git a/src/com/android/launcher3/graphics/PreloadIconDrawable.java b/src/com/android/launcher3/graphics/PreloadIconDrawable.java
index 06dc7acfe..6d486eed7 100644
--- a/src/com/android/launcher3/graphics/PreloadIconDrawable.java
+++ b/src/com/android/launcher3/graphics/PreloadIconDrawable.java
@@ -30,9 +30,9 @@ import android.graphics.PathMeasure;
import android.graphics.Rect;
import android.util.Property;
import android.util.SparseArray;
-import android.view.animation.LinearInterpolator;
import com.android.launcher3.FastBitmapDrawable;
+import com.android.launcher3.anim.Interpolators;
import java.lang.ref.WeakReference;
@@ -226,7 +226,7 @@ public class PreloadIconDrawable extends FastBitmapDrawable {
mCurrentAnim = ObjectAnimator.ofFloat(this, INTERNAL_STATE, finalProgress);
mCurrentAnim.setDuration(
(long) ((finalProgress - mInternalStateProgress) * DURATION_SCALE));
- mCurrentAnim.setInterpolator(new LinearInterpolator());
+ mCurrentAnim.setInterpolator(Interpolators.LINEAR);
if (isFinish) {
mCurrentAnim.addListener(new AnimatorListenerAdapter() {
@Override
@@ -237,7 +237,6 @@ public class PreloadIconDrawable extends FastBitmapDrawable {
}
mCurrentAnim.start();
}
-
}
/**