daimajia / AndroidSwipeLayout

The Most Powerful Swipe Layout!
MIT License
12.38k stars 2.67k forks source link

onOpen/onClose called without any logic #332

Open doruchidean-lifeishard opened 8 years ago

doruchidean-lifeishard commented 8 years ago

this is getting frustrating, I cannot use onOpen method to perform a call

vladut-dascalescu commented 8 years ago

Hi doruchidean-lifeishard ,

Have you tried adding a swipeListener foreach swipelayout and see if onOpen/onClose are called multiple times ? I mean like this :

swipeLayout.addSwipeListener(new CustomSwipeLayout.SwipeListener() 
{
@Override
public void onStartOpen(CustomSwipeLayout layout) {

}

@Override
public void onOpen(CustomSwipeLayout layout) {
    Log.e("SwipeLayout", "Item opened !!!");
}

@Override
public void onStartClose(CustomSwipeLayout layout) {

}

@Override
public void onClose(CustomSwipeLayout layout) {
    Log.e("SwipeLayout", "Item closed !!!");
}

@Override
public void onUpdate(CustomSwipeLayout layout, int leftOffset, int topOffset) {

}

@Override
public void onHandRelease(CustomSwipeLayout layout, float xvel, float yvel) {

}
}); 

And see if you how many logs are showed when you open/close list items ;).

Good luck !