How to swipe to previous activity using gesture and animation like in Telegram and Tinder app?
Telegram is using it's own created fragments.They Created a class named ActionBarLayout which is basically a FrameLayout and is added to the main Activity and the fragment is just a view class (called TelegramFragment) that is added to the ActionBarLayout (they are kept in a list and much faster than normal fragments (with a bit less features).
To do the animation , they just animate the added view.
You can see the classes work in action HERE and HERE
there is a good library on github where I gave my contribute: it handles this feature both with activities and fragments.
https://github.com/r0adkll/Slidr
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With