diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-02-26 11:26:19 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-02-26 11:26:19 -0800 |
commit | 560616da70648bed04c00aa804503ec72ace1337 (patch) | |
tree | 93bb435760803b9193580cbb33ceb5208a0cd3eb | |
parent | ed46c093cf1f34a2056846ac826b19fa2335ec18 (diff) | |
download | android_packages_apps_Trebuchet-560616da70648bed04c00aa804503ec72ace1337.tar.gz android_packages_apps_Trebuchet-560616da70648bed04c00aa804503ec72ace1337.tar.bz2 android_packages_apps_Trebuchet-560616da70648bed04c00aa804503ec72ace1337.zip |
Build fix. Some references of a resources still remained after ag/619757
Change-Id: Ia05a12ff5af6fa13d75cbedd8bd2fd6d33a78b7f
-rw-r--r-- | src/com/android/launcher3/AppsCustomizePagedView.java | 15 | ||||
-rw-r--r-- | src/com/android/launcher3/DragView.java | 6 |
2 files changed, 2 insertions, 19 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java index 9e7e523e0..875cd2108 100644 --- a/src/com/android/launcher3/AppsCustomizePagedView.java +++ b/src/com/android/launcher3/AppsCustomizePagedView.java @@ -16,8 +16,6 @@ package com.android.launcher3; -import android.animation.AnimatorSet; -import android.animation.ValueAnimator; import android.appwidget.AppWidgetHostView; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProviderInfo; @@ -42,7 +40,6 @@ import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.view.animation.AccelerateInterpolator; import android.widget.GridLayout; import android.widget.ImageView; import android.widget.Toast; @@ -450,18 +447,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen mWidgetInstructionToast = Toast.makeText(getContext(),R.string.long_press_widget_to_add, Toast.LENGTH_SHORT); mWidgetInstructionToast.show(); - - // Create a little animation to show that the widget can move - float offsetY = getResources().getDimensionPixelSize(R.dimen.dragViewOffsetY); - final ImageView p = (ImageView) v.findViewById(R.id.widget_preview); - AnimatorSet bounce = LauncherAnimUtils.createAnimatorSet(); - ValueAnimator tyuAnim = LauncherAnimUtils.ofFloat(p, "translationY", offsetY); - tyuAnim.setDuration(125); - ValueAnimator tydAnim = LauncherAnimUtils.ofFloat(p, "translationY", 0f); - tydAnim.setDuration(100); - bounce.play(tyuAnim).before(tydAnim); - bounce.setInterpolator(new AccelerateInterpolator()); - bounce.start(); } public boolean onKey(View v, int keyCode, KeyEvent event) { diff --git a/src/com/android/launcher3/DragView.java b/src/com/android/launcher3/DragView.java index ea34e46f9..78d72b30f 100644 --- a/src/com/android/launcher3/DragView.java +++ b/src/com/android/launcher3/DragView.java @@ -70,8 +70,6 @@ public class DragView extends View { mInitialScale = initialScale; final Resources res = getResources(); - final float offsetX = res.getDimensionPixelSize(R.dimen.dragViewOffsetX); - final float offsetY = res.getDimensionPixelSize(R.dimen.dragViewOffsetY); final float scaleDps = res.getDimensionPixelSize(R.dimen.dragViewScale); final float scale = (width + scaleDps) / width; @@ -87,8 +85,8 @@ public class DragView extends View { public void onAnimationUpdate(ValueAnimator animation) { final float value = (Float) animation.getAnimatedValue(); - final int deltaX = (int) ((value * offsetX) - mOffsetX); - final int deltaY = (int) ((value * offsetY) - mOffsetY); + final int deltaX = (int) (-mOffsetX); + final int deltaY = (int) (-mOffsetY); mOffsetX += deltaX; mOffsetY += deltaY; |