Closed AngleV closed 8 years ago
For functionality similar to Instagram I think the using a HoldAndReleaseView would be better for this. Currently for the HoldAndReleaseView an event is only triggered on release but I'll be updating the library shortly to include an event for on hold too and on leave.
Does this help?
@shalskar What it would be more useful. Consider the following code.
peekAndPop.setOnHoldAndReleaseListener(new PeekAndPop.OnHoldAndReleaseListener() {
@Override
public void onHoldAndRelease(View view, int position) {
//user released the finger
//do your stuff
}
@Override
public void onHold(View view, int position) {
//user is holding the finger on the view
a setLongHoldDuration method would be nice here for this also.
//do your stuff also
}
@Override
public void onLeave(View view, int position) {
//user left his finger from the view
//do your stuff also
}
});
what do you think ?
Cool, that's why I'm currently doing now, I should have it up soon.
Awesome mate !!! :p
I have added the functionality now, let me know if you have any problems.
compile 'com.github.shalskar:PeekAndPop:3e3225c340'
it works PERFECT !!! Thank you
@shalskar
When user hold his finger on a view that i have assing as a LongHoldView, a small tooltip pops up as like instagram does.
The issue here is that when user moves his finger out of the peekview, the tooltip stays there as i dont have a way to dismiss it. Consider adding an OnLeaveListener would be nice.