diff options
author | Andrew Flynn <flynn@google.com> | 2012-05-17 13:37:52 -0700 |
---|---|---|
committer | Andrew Flynn <flynn@google.com> | 2012-05-17 13:48:47 -0700 |
commit | d5e9734f3ed493fd06c005f7a13bfd719c8062bd (patch) | |
tree | 83dc9d54f58266b08caed91f75e81b466742fe62 /src/com | |
parent | 90340cf67aa413112eb1a697e301894a7e1a8a2a (diff) | |
download | packages_apps_trebuchet-d5e9734f3ed493fd06c005f7a13bfd719c8062bd.zip packages_apps_trebuchet-d5e9734f3ed493fd06c005f7a13bfd719c8062bd.tar.gz packages_apps_trebuchet-d5e9734f3ed493fd06c005f7a13bfd719c8062bd.tar.bz2 |
Change custom workspace cling
Change-Id: I8fe44469ac4bf38f9be2228d8eace1198bf3a48e
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher2/Cling.java | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/com/android/launcher2/Cling.java b/src/com/android/launcher2/Cling.java index 6f2d021..7978298 100644 --- a/src/com/android/launcher2/Cling.java +++ b/src/com/android/launcher2/Cling.java @@ -62,7 +62,6 @@ public class Cling extends FrameLayout { private int mButtonBarHeight; private float mRevealRadius; private int[] mPositionData; - private int[] mCustomPositionData; private Paint mErasePaint; @@ -89,17 +88,6 @@ public class Cling extends FrameLayout { Resources r = getContext().getResources(); - // If we have custom punch through data from resources - TypedArray punchThroughCoords = r.obtainTypedArray(R.array.punch_through_coords); - - if (punchThroughCoords != null) { - int len = punchThroughCoords.length(); - mCustomPositionData = new int[len]; - for (int i = 0; i < len; i++) { - mCustomPositionData[i] = punchThroughCoords.getDimensionPixelSize(i, 0); - } - } - mPunchThroughGraphic = r.getDrawable(R.drawable.cling); mPunchThroughGraphicCenterRadius = r.getDimensionPixelSize(R.dimen.clingPunchThroughGraphicCenterRadius); @@ -133,8 +121,6 @@ public class Cling extends FrameLayout { final int cornerXOffset = (int) (scale * 15); final int cornerYOffset = (int) (scale * 10); return new int[]{getMeasuredWidth() - cornerXOffset, cornerYOffset}; - } else if (mDrawIdentifier.equals(WORKSPACE_CUSTOM)) { - return mCustomPositionData; } else if (mDrawIdentifier.equals(ALLAPPS_PORTRAIT) || mDrawIdentifier.equals(ALLAPPS_LANDSCAPE) || mDrawIdentifier.equals(ALLAPPS_LARGE)) { @@ -148,7 +134,6 @@ public class Cling extends FrameLayout { if (mDrawIdentifier.equals(WORKSPACE_PORTRAIT) || mDrawIdentifier.equals(WORKSPACE_LANDSCAPE) || mDrawIdentifier.equals(WORKSPACE_LARGE) || - mDrawIdentifier.equals(WORKSPACE_CUSTOM) || mDrawIdentifier.equals(ALLAPPS_PORTRAIT) || mDrawIdentifier.equals(ALLAPPS_LANDSCAPE) || mDrawIdentifier.equals(ALLAPPS_LARGE)) { @@ -172,6 +157,9 @@ public class Cling extends FrameLayout { return false; } } + } else if (mDrawIdentifier.equals(WORKSPACE_CUSTOM)) { + // Let all touch events fall through + return false; } return true; }; @@ -191,15 +179,15 @@ public class Cling extends FrameLayout { if (mBackground == null) { if (mDrawIdentifier.equals(WORKSPACE_PORTRAIT) || mDrawIdentifier.equals(WORKSPACE_LANDSCAPE) || - mDrawIdentifier.equals(WORKSPACE_LARGE) || - mDrawIdentifier.equals(WORKSPACE_CUSTOM)) { + mDrawIdentifier.equals(WORKSPACE_LARGE)) { mBackground = getResources().getDrawable(R.drawable.bg_cling1); } else if (mDrawIdentifier.equals(ALLAPPS_PORTRAIT) || mDrawIdentifier.equals(ALLAPPS_LANDSCAPE) || mDrawIdentifier.equals(ALLAPPS_LARGE)) { mBackground = getResources().getDrawable(R.drawable.bg_cling2); } else if (mDrawIdentifier.equals(FOLDER_PORTRAIT) || - mDrawIdentifier.equals(FOLDER_LANDSCAPE)) { + mDrawIdentifier.equals(FOLDER_LANDSCAPE) || + mDrawIdentifier.equals(WORKSPACE_CUSTOM)) { mBackground = getResources().getDrawable(R.drawable.bg_cling3); } else if (mDrawIdentifier.equals(FOLDER_LARGE)) { mBackground = getResources().getDrawable(R.drawable.bg_cling4); |