diff options
author | Adam Cohen <adamcohen@google.com> | 2013-09-18 19:09:15 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2013-09-18 19:10:53 -0700 |
commit | dbdff6bc7b225255207a46fad8f536b55a18efac (patch) | |
tree | 0597a9e5cd497a83a3d786f75211a4707095bcc9 /src/com/android/launcher3/PagedView.java | |
parent | 1f2d9f978f608c876a4952404530009e3e33c36a (diff) | |
download | android_packages_apps_Trebuchet-dbdff6bc7b225255207a46fad8f536b55a18efac.tar.gz android_packages_apps_Trebuchet-dbdff6bc7b225255207a46fad8f536b55a18efac.tar.bz2 android_packages_apps_Trebuchet-dbdff6bc7b225255207a46fad8f536b55a18efac.zip |
Handful of small changes / bug fixes
-> Fixed fade in of overview panel on first animation
-> Fixed long press issue in page indicator region
-> Added background scrim to overview mode
-> Fading search bar in overview mode / disabling clickability
of search bar and mic
Change-Id: Ic9bf84f7cb9ff2991c5b4e93273d9e3f65556e5c
Diffstat (limited to 'src/com/android/launcher3/PagedView.java')
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 30c3ea752..d8fc98330 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -133,6 +133,8 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc protected float mTotalMotionX; private int mLastScreenCenter = -1; + private boolean mCancelTap; + private int[] mPageScrolls; protected final static int TOUCH_STATE_REST = 0; @@ -735,7 +737,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc // NOTE: We multiply by 1.5f to account for the fact that depending on the offset of the // viewport, we can be at most one and a half screens offset once we scale down DisplayMetrics dm = getResources().getDisplayMetrics(); - int maxSize = Math.max(dm.widthPixels, dm.heightPixels); + int maxSize = Math.max(dm.widthPixels, dm.heightPixels + mInsets.top + mInsets.bottom); int parentWidthSize, parentHeightSize; int scaledWidthSize, scaledHeightSize; if (mUseMinScale) { @@ -1851,7 +1853,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc onDropToDelete(); } } else { - onUnhandledTap(ev); + if (!mCancelTap) { + onUnhandledTap(ev); + } } // Remove the callback to wait for the side page hover timeout @@ -1884,6 +1888,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc private void resetTouchState() { releaseVelocityTracker(); endReordering(); + mCancelTap = false; mTouchState = TOUCH_STATE_REST; mActivePointerId = INVALID_POINTER; } @@ -2156,6 +2161,12 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc return mAllowLongPress; } + @Override + public boolean performLongClick() { + mCancelTap = true; + return super.performLongClick(); + } + /** * Set true to allow long-press events to be triggered, usually checked by * {@link Launcher} to accept or block dpad-initiated long-presses. |