I use com.baoyz.swipemenulistview.SwipeMenuListView in linearLayout and scrollView because I need more lists on one screen. When user is swiping item and scroll whole screen together, it doesnt close, and it is still open, like on picture below. I dont know how to force close it.
Asked
Active
Viewed 574 times
1 Answers
0
I solve it just for opening with scrollview from Asha Soman answer http://stackoverflow.com/questions/18652692/how-to-disable-scrollview-scrolling
listGroupsToUpload.setOnSwipeListener(new SwipeMenuListView.OnSwipeListener() {
@Override
public void onSwipeStart(int position) {
LOG.print("onSwipeStart");
scrollView.setScrollingEnabled(false);
}
@Override
public void onSwipeEnd(int position) {
LOG.print("onSwipeEnd");
scrollView.setScrollingEnabled(true);
}
});
but I realise, that I will need to detect, when user start closing. So I modified library (class SwipeMenuListView) a little and I added two custom onPress listener like on picture below (do not forget check them for null) and one release listener for ACTION_UP and now it is working.
listGroupsToUpload.setOnReleaseListener(new SwipeMenuListView.OnReleaseListener() {
@Override
public void onPress() {
scrollView.setScrollingEnabled(false);
}
@Override
public void onRelease() {
scrollView.setScrollingEnabled(true);
}
});

jan hruska
- 249
- 1
- 9