Reputation: 1286
Im trying to implement Swipe ListView open source library by 47Deg inside a fragment of ViewPager. I tried this library in simple Activity and it work flawless. References to this library are follow:
Senario
As I mentioned I want to implement it inside fragment of ViewPager but when I swipe on item of a list the view page slides away. I wanted to wipe list item when list item is touched and swipe fragment otherwise.
What I have already done
I created a custom class CustomViewPager extends ViewPager{} and disabled the swipe on touch by using the solution provided HERE. I also tried tweaking around with onTouch, Clickable tags and other thing which I could do best as I'm a newbie.
Help me regarding this issue.
Upvotes: 2
Views: 1646
Reputation: 667
in class class SwipeListViewTouchListener in method public boolean onTouch(View view, MotionEvent motionEvent) { I added view.getParent().requestDisallowInterceptTouchEvent(true); and it works for me. Give it a try may be it works for you too.
Upvotes: 5