I implemented (from here - horizontal scrolling in the list) ) to mark-mark elements in the list. I used Johan Nilsson pull to refresh to update the items in the list. The pull to refresh function showed some sharp behavior -
- sometimes shows "Tap to Refresh"
- sometimes not completely hidden
- sometimes does not change from "Pull to refresh" to "Release ..."
Now I have switched to implementation. The "pull to refresh" function now works fine, but the "swipe" function has stopped working. Swipe works fine otherwise.
final GestureDetector gestureDetector = new GestureDetector( new MyGestureDetector()); View.OnTouchListener gestureListener = new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { return gestureDetector.onTouchEvent(event); } }; postListView.setOnTouchListener(gestureListener);
postListView PullToRefreshListView postListView = (PullToRefreshListView) linearLayout.findViewById(R.id.post_list);
I think it doesn’t work, because even Chris’s implementation uses -
public boolean onTouch(View v, MotionEvent event) {
Now, how can I use it in both places without any conflicts? I need to detect gestures in listview strings, and also listen for pull list.
source share