diff --git a/res/values-xlarge/config.xml b/res/values-xlarge/config.xml
index c7c68e22f6..73e7146205 100644
--- a/res/values-xlarge/config.xml
+++ b/res/values-xlarge/config.xml
@@ -27,8 +27,6 @@
350
350
- 600
-
@@ -38,11 +36,4 @@
the drag view should be offset from the position of the original view. -->
0
12
-
-
- 900
-
-
- 180
diff --git a/res/values/config.xml b/res/values/config.xml
index db967ea28e..b6d5037121 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -5,6 +5,8 @@
0
false
+ 600
+
@@ -15,4 +17,11 @@
Setting to 1/2 of config_dragViewExtraPixels keeps it centered on its old position. -->
20
20
+
+
+ 900
+
+
+ 180
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 7da66127fc..3f9945fd2d 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -145,57 +145,57 @@ public class CellLayout extends ViewGroup implements Dimmable {
mWallpaperManager = WallpaperManager.getInstance(context);
- if (LauncherApplication.isScreenXLarge()) {
- final Resources res = getResources();
+ final Resources res = getResources();
+ if (LauncherApplication.isScreenXLarge()) {
mBackgroundMini = res.getDrawable(R.drawable.mini_home_screen_bg);
mBackgroundMini.setFilterBitmap(true);
mBackground = res.getDrawable(R.drawable.home_screen_bg);
mBackground.setFilterBitmap(true);
mBackgroundMiniHover = res.getDrawable(R.drawable.mini_home_screen_bg_hover);
mBackgroundMiniHover.setFilterBitmap(true);
+ }
- // Initialize the data structures used for the drag visualization.
+ // Initialize the data structures used for the drag visualization.
- mDragRectDrawable = res.getDrawable(R.drawable.rounded_rect_green);
- mCrosshairsDrawable = res.getDrawable(R.drawable.gardening_crosshairs);
- Interpolator interp = new DecelerateInterpolator(2.5f); // Quint ease out
+ mDragRectDrawable = res.getDrawable(R.drawable.rounded_rect_green);
+ mCrosshairsDrawable = res.getDrawable(R.drawable.gardening_crosshairs);
+ Interpolator interp = new DecelerateInterpolator(2.5f); // Quint ease out
- // Set up the animation for fading the crosshairs in and out
- int animDuration = res.getInteger(R.integer.config_crosshairsFadeInTime);
- mCrosshairsAnimator = new ValueAnimator(animDuration);
- mCrosshairsAnimator.addUpdateListener(new AnimatorUpdateListener() {
+ // Set up the animation for fading the crosshairs in and out
+ int animDuration = res.getInteger(R.integer.config_crosshairsFadeInTime);
+ mCrosshairsAnimator = new ValueAnimator(animDuration);
+ mCrosshairsAnimator.addUpdateListener(new AnimatorUpdateListener() {
+ public void onAnimationUpdate(ValueAnimator animation) {
+ mCrosshairsVisibility = ((Float) animation.getAnimatedValue()).floatValue();
+ CellLayout.this.invalidate();
+ }
+ });
+ mCrosshairsAnimator.setInterpolator(interp);
+
+ for (int i = 0; i < mDragRects.length; i++) {
+ mDragRects[i] = new Rect();
+ }
+
+ // When dragging things around the home screens, we show a green outline of
+ // where the item will land. The outlines gradually fade out, leaving a trail
+ // behind the drag path.
+ // Set up all the animations that are used to implement this fading.
+ final int duration = res.getInteger(R.integer.config_dragOutlineFadeTime);
+ final int fromAlphaValue = 0;
+ final int toAlphaValue = res.getInteger(R.integer.config_dragOutlineMaxAlpha);
+ for (int i = 0; i < mDragRectAnims.length; i++) {
+ final InterruptibleInOutAnimator anim =
+ new InterruptibleInOutAnimator(duration, fromAlphaValue, toAlphaValue);
+ anim.setInterpolator(interp);
+ final int thisIndex = i;
+ anim.addUpdateListener(new AnimatorUpdateListener() {
public void onAnimationUpdate(ValueAnimator animation) {
- mCrosshairsVisibility = ((Float) animation.getAnimatedValue()).floatValue();
- CellLayout.this.invalidate();
+ mDragRectAlphas[thisIndex] = (Integer) animation.getAnimatedValue();
+ CellLayout.this.invalidate(mDragRects[thisIndex]);
}
});
- mCrosshairsAnimator.setInterpolator(interp);
-
- for (int i = 0; i < mDragRects.length; i++) {
- mDragRects[i] = new Rect();
- }
-
- // When dragging things around the home screens, we show a green outline of
- // where the item will land. The outlines gradually fade out, leaving a trail
- // behind the drag path.
- // Set up all the animations that are used to implement this fading.
- final int duration = res.getInteger(R.integer.config_dragOutlineFadeTime);
- final int fromAlphaValue = 0;
- final int toAlphaValue = res.getInteger(R.integer.config_dragOutlineMaxAlpha);
- for (int i = 0; i < mDragRectAnims.length; i++) {
- final InterruptibleInOutAnimator anim =
- new InterruptibleInOutAnimator(duration, fromAlphaValue, toAlphaValue);
- anim.setInterpolator(interp);
- final int thisIndex = i;
- anim.addUpdateListener(new AnimatorUpdateListener() {
- public void onAnimationUpdate(ValueAnimator animation) {
- mDragRectAlphas[thisIndex] = (Integer) animation.getAnimatedValue();
- CellLayout.this.invalidate(mDragRects[thisIndex]);
- }
- });
- mDragRectAnims[i] = anim;
- }
+ mDragRectAnims[i] = anim;
}
}