Suppose I have a layout file structured as follows:
<LinearLayout android:id="@+id/main" android:orientation="vertical" android:animateLayoutChanges="true"> <EditText> <TextView android:id="@+id/header1"> <LinearLayout android:id="@+id/insertionPoint" android:orientation="vertical" android:animateLayoutChanges="true"> </LinearLayout> <TextView android:id="@+id/header2"> </LinearLayout>
I want to dynamically add text fields to the insertionPoint
layout, and I would like the animation of the elements below (in this case header2
) to slide down.
Using android:animateLayoutChanges
only animates the elements in the insertionPoint
layout, so there is no animation for header2
. What should I do?
Just to be more clear: what I would like to do here is something like animations that we can see in the People app in ICS when we add more fields to the contact, such as phone numbers.
Thanks!
source share