Fixing accidental open when in a scroll view
This commit is contained in:
parent
e89391e992
commit
9bd67cead6
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Reference in New Issue