If you’ve ever wondered why it’s a bit more expensive to implement an otherwise equal Android app, this might shed some light on the issue (Starting at about 6:55 in the video)
This is using a View Property Animator, which was an API that came in in 3.1, Honeycomb 3.1. And we’re also going to animate translation x to its end value, either back all the way on the screen or all the way off the screen. And then we’re going to run an end action. Not this is an API that came in in Jelly Bean, so if you’re writing for Jelly Bean and later, that’s fine. If you’re writing for run times that are earlier than Jelly Bean, you don’t have to use an end action here. Insted, you can set up a listener on the View Property Animator, and it’s just a little bit more code, but it’s effectively the same thing.