Don't scroll on ListView

377 views Asked by At

i have a ViewFlipper, which contains only on ListView.The flipper uses SwipeDetection to change Next/Previous-Elements.These implementation works fine, but I have a problem with the scrollig function of the embedded ListView, cause often if I only want to swipe to next/previos view, the ListView ( which implements the swipedetector) scrolls up or down. Is there an possibility to deativate these scrolling if I only want to swipe?

1

There are 1 answers

1
Murat Nafiz On BEST ANSWER

You can create your own class which extends ViewFlipper and override the onInterceptTouchEvent(MotionEvent ev) method for intercepting touch events.

If you always return true for this function, your viewflipper will consume all touchEvents