From dbab035189634f7e4ab10e550116b943aec8b2ae Mon Sep 17 00:00:00 2001 From: pengqinping Date: Sun, 16 Mar 2014 23:07:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=8B=E6=8C=87=E6=8C=89?= =?UTF-8?q?=E5=9C=A8=E5=B1=8F=E5=B9=95=E4=B8=8AlistView=E6=9C=89=E6=8A=96?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/me/maxwin/view/XListView.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/me/maxwin/view/XListView.java b/src/me/maxwin/view/XListView.java index 7076763..ea54101 100755 --- a/src/me/maxwin/view/XListView.java +++ b/src/me/maxwin/view/XListView.java @@ -275,6 +275,11 @@ public boolean onTouchEvent(MotionEvent ev) { break; case MotionEvent.ACTION_MOVE: final float deltaY = ev.getRawY() - mLastY; + + if (Math.abs(deltaY) < 10) { + return super.onTouchEvent(ev); + } + mLastY = ev.getRawY(); if (getFirstVisiblePosition() == 0 && (mHeaderView.getVisiableHeight() > 0 || deltaY > 0)) { @@ -303,7 +308,8 @@ public boolean onTouchEvent(MotionEvent ev) { } else if (getLastVisiblePosition() == mTotalItemCount - 1) { // invoke load more. if (mEnablePullLoad - && mFooterView.getBottomMargin() > PULL_LOAD_MORE_DELTA) { + && mFooterView.getBottomMargin() > PULL_LOAD_MORE_DELTA + && !mPullLoading) { startLoadMore(); } resetFooterHeight();