I am currently making a chat app and i want to add a feature like telegram. As you can see here, there is a animation in the recycler view as if i=t zooming or decreasing its size. You can also notice that animation while opening and closing the navigation drawer. I too tried to do that using this but i get no animation in the recycler view. See this. Actually not this but like this. I took this gif from the README of the repo. So is that possible? If so, can you please tell me a simple implementation ?
Thanks in advance and i will be waiting 😀
2
Answers
Add
overridePendingTransition
inonBackPressed()
method:To me it looks like an Activity transition where the
translateZ
value is modified. But since the Telegram Android client is open source, we can just take a look at it.It looks like the Telegram devs use a lot of custom code instead of relying on the android SDK.
The
DialogsActivity
which extends aBaseFragment
but is neither an AndroidActivity
nor an AndroidFragment
sinceBaseFragment
doesn’t extend any of them, has the following method for the transition: