yuyakaido / CardStackView

📱Tinder like swipeable card view for Android
Apache License 2.0
2.37k stars 448 forks source link

How can i assing a new activity to the swipe to right? #279

Closed leslaliun closed 4 years ago

leslaliun commented 5 years ago

Im stuck, i need you all help, how could i add that event in the tittle ? I have this:

val newActivity= Intent(this, newActivity::class.java)
startActivity(newActivity)

that works well with the like button, but i cant find out how to make it work with the swipe to right, i looked for the method CardStackListener.onCardSwiped(Direction direction) but my brain just cant,, can you give me a hand?

yuyakaido commented 4 years ago

@leslaliun As you mentioned, if you want to invoke any actions when a card is swiped, you need to put your codes in CardStackListener.onCardSwiped(Direction direction). If you need more information, you can check sample app.