Closed quiffman closed 13 years ago
FWIW - I wonder if applyHeaderPadding
should check getHistorySize
- the following patch appears to solve the issue for me.
diff --git a/pulltorefresh/src/com/markupartist/android/widget/PullToRefreshListView.java b/pulltorefresh/src/com/markupartist/android/widget/PullToRefreshL
index e44db80..5ae52cc 100644
--- a/pulltorefresh/src/com/markupartist/android/widget/PullToRefreshListView.java
+++ b/pulltorefresh/src/com/markupartist/android/widget/PullToRefreshListView.java
@@ -203,7 +203,7 @@ public class PullToRefreshListView extends ListView implements OnScrollListener
// (it's always 1 in 1.5)
int pointerCount = 1;
try {
- Method method = MotionEvent.class.getMethod("getPointerCount");
+ Method method = MotionEvent.class.getMethod("getHistorySize");
pointerCount = (Integer)method.invoke(ev);
} catch (NoSuchMethodException e) {
pointerCount = 1;
Goot catch! but do you know if this fix only applies to tablets, or only from a specific Android version up? I just received a report on the market with this error and I'd like to apply the fix, but since my app is available for 1.6 devices as well I don't want to cause a break for other people...
Great finding. Would you like to send a pull request with the change or would you like me to just patch it?
If it's enough to use getHistorySize
I guess we can skip the reflection part as well. Need to investigate that further.
On android 3.2 - both Galaxy 10.1 and Acer A100, I see this behaviour when pulling to refresh: