Does anyone have a simple example of a ListActivity displaying Textviews in a column and when you swipe left to right you see that row in a new view? This would be to say edit the data for that row or show more detailed info on that row. Please do not reference code shogun or other sites as I have googled and have not seen this answered.
Does anyone have a simple example of a ListActivity displaying Textviews in a column
Share
I had the same problem and I didn’t find my answer here.
I wanted to detect a swipe action in ListView item and mark it as swiped, while continue to support OnItemClick and OnItemLongClick.
Here is me solution:
1st The SwipeDetector class:
2nd I use the swipe detector class in the list view:
This way I can support 3 actions – swipe, click, long click and I can use the ListView item info.
ADDED LATER:
Since ListView catches a scrolling action, it is sometimes hard to swipe. To fix it, I made the following change to SwipeDetector.onTouch: