Bring your layouts to life in 5 simple steps!
- Set
minSdkVersion 11
- Open your layout
- Add
android:animateLayoutChanges="true"
to your layout root (or anyViewGroup
, for that matter) - ???
- Profit!
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.