Techfist
Techfist

Reputation: 4344

ListView Animation, Animating Childs

I have a implementation of ListView, Problem in hand is animating childs, upon removal of certain elements from listview. To elaborate further, User can select any number of view from list, and can perform multiple delete, upon delete two things has to be done.

  1. All those selected item should disappear/delete away from list(Done)
  2. Once items are deleted, all the remaining view should animate themselves upward toward list filling all the void places.

Animation is again broken down in two sequences.

  1. Delete child should scale down and subsequently fade away (Done)
  2. Remaining Item should animate themselves updward filling void places (NEED HELP).

Any help/pointer will be appriciated.

Regards, techfist

Upvotes: 0

Views: 122

Answers (1)

Gopal Gopi
Gopal Gopi

Reputation: 11131

use android:animateLayoutChanges attribute for ListView. see below example

<ListView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:animateLayoutChanges="true" >
</ListView>

Upvotes: 0

Related Questions