Android Animations Cookbook

In all honesty, this article is for my own reference but hopefully someone else can find it helpful too. I’ll be adding to it over time.

Basics

Use the ObjectAnimator to change the property. Most View properties are here. This section of the Property Animation guide also is good to have on hand.

ObjectAnimator.ofFloat(textView, "translationX", 100f).apply {
duration = 1000
start()
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store