I'm using the 47degrees android swipe list view https://github.com/47deg/android-swipelistview
I have all the files copied into my Eclipse project unchanged.
I have the listview setup in xml
<com.company.appname.swipe.SwipeListView
xmlns:swipe="http://schemas.android.com/apk/res-auto"
android:id="@+id/home_list_view"
android:listSelector="#00000000"
android:layout_width="match_parent"
android:layout_height="match_parent"
swipe:swipeFrontView="@id/swipelist_frontview"
swipe:swipeBackView="@id/swipelist_backview"
swipe:swipeActionLeft="reveal"
swipe:swipeActionRight="reveal"
swipe:swipeMode="both"
swipe:swipeCloseAllItemsWhenMoveList="false"
swipe:swipeOpenOnLongPress="false"
swipe:swipeAnimationTime="300"
swipe:swipeOffsetLeft="100dp"
swipe:swipeOffsetRight="0dp"
/>
I have setup the SwipeListView in code
SwipeListViewTouchListener touchListener = new SwipeListViewTouchListener(mListView, R.id.swipelist_frontview, R.id.swipelist_backview);
touchListener.resetItems();
mListView.setOnTouchListener(touchListener);
When I try to swipe an list item, the top view begins sliding away for a second then stops part way (say 10% on average but may vary slightly depending on the speed of the swipe). So it is stuck there in that position. The second time I try to swipe it, it scrolls smoothly away.
Note: It pauses every second time I touch an item - but it doesn't have to be the same item. For example, I could begin to swipe one row which will stop, then I could scroll either the same row or a different one and it will be smooth.
On investigation, I noticed the first attempt at swiping throws and MotionEvent.ACTION_DOWN
event followed by a MotionEvent.ACTION_UP
event. The second time there is a MotionEvent.ACTION_DOWN
followed by a MotionEvent.ACTION_MOVE
followed by a MotionEvent.ACTION_UP
(So the first time there is no MotionEvent.ACTION_MOVE
)
Any ideas or suggestions?
It seems that changing the listview swipemode property to
swipe:swipeMode="none"
fixes my particular problem.