Fixing accidental open when in a scroll view

This commit is contained in:
Arvind Menon 2014-09-01 15:48:15 -04:00
parent e89391e992
commit 9bd67cead6
2 changed files with 4 additions and 6 deletions

View File

@ -78,11 +78,9 @@ public abstract class SwipeAdapter extends BaseAdapter {
* @param mode
*/
public void setMode(Mode mode){
if(mode == Mode.Multiple){
mOpenPositions.clear();
}else{
mOpenPosition = INVALID_POSITION;
}
// Clear currently set values
mOpenPositions.clear();
mOpenPosition = INVALID_POSITION;
this.mode = mode;
notifyDataSetChanged();
}

View File

@ -930,7 +930,7 @@ public class SwipeLayout extends FrameLayout {
*/
private void processSurfaceRelease(float xvel, float yvel){
if(xvel == 0 && getOpenStatus() == Status.Middle)
open();
close();
if(mDragEdge == DragEdge.Left || mDragEdge == DragEdge.Right){
if(xvel > 0){