Tutorials icon indicating copy to clipboard operation
Tutorials copied to clipboard

I dont know how to get position of the swiped view from MainActivity

Open RozinaDarediya opened this issue 8 years ago • 2 comments

@janishar Thank you for an awesome tutorial. I am new to android and want to add functionality of swiping view. I have used your tutorial as Demo. But I am confused/unaware how to know which object is swiped from the MainActivity not from the SwipeView fragment. Of course I get if (view.getId() == R.id.btnReject) { mSwipeView.doSwipe(false); } But how do I know the object position or tag!?

Hope you will replay soon Thank you

RozinaDarediya avatar Oct 30 '17 11:10 RozinaDarediya

@RozinaDarediya Refer to this class to see the callbacks: https://github.com/janishar/Tutorials/blob/master/RandomPromotionalCards/app/src/main/java/android/mindorks/com/randomaddviewcards/TinderCard.java

janishar avatar Oct 31 '17 18:10 janishar

@janishar Thank you for the answer. I forgot that I can always have fantastic functionality of Interface. Thanks

RozinaDarediya avatar Dec 12 '17 05:12 RozinaDarediya