Bring your layouts to life in 5 simple steps!
- Open your layout
android:animateLayoutChanges="true"to your layout root (or any
ViewGroup, for that matter)
That’s it, seriously. The default transitions set animates item being added/removed (or whose visibility changes) using a fade, and stuff being moved/resized.
More info and a small tutorial can be found on the Android Developers website.
Oh, one more thing!
Go and read Lucas’ post about KitKat transitions — they are basically
LayoutTransition’s bigger brother. But, alas,
minSdkVersion 19 is not a thing yet.