daemmie
daemmie

Reputation: 6460

Which Layouts support animateLayoutChanges

I often used animateLayoutChanges in the xml to fade-in/-out a View when I change its Visibility later in code.

When I search for examples of it it is mostly used in combination with a LinearLayout. But it also works with RelativeLayout.

Question:

What Layouts support animateLayoutChanges (to fadein/out) and is there an offical documentation? It would also be helpful if someone could tell me if any parent class like ViewGroup handles it and all of the SubClasses support animateLayoutChanges

Addition:

The tutorial page says:

In your activity's layout XML file, set the android:animateLayoutChanges attribute to true for the layout that you want to enable animations for.

So my first guess would be, it works for all layouts? But does it also for Views like ScrollView, TableRow etc. which are also indirect SubClasses of ViewGroup.

Has anyone experience with this?

Upvotes: 0

Views: 246

Answers (1)

snachmsm
snachmsm

Reputation: 19253

animateLayoutChanged was introduced in API 11 for every ViewGroup, there is also related method setLayoutTransition (and other). more in doc of ViewGroup HERE and on top of doc there is section with extending classes (Known Direct Subclasses)

Upvotes: 1

Related Questions