Build fix. Some references of a resources still remained after ag/619757

Change-Id: Ia05a12ff5af6fa13d75cbedd8bd2fd6d33a78b7f
This commit is contained in:
Sunny Goyal
2015-02-26 11:26:19 -08:00
parent ed46c093cf
commit 560616da70
2 changed files with 2 additions and 19 deletions
@@ -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) {
+2 -4
View File
@@ -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;