Reputation: 24847
I would like to have each item in a ListView slide in from the right. Now I know I could just perform a translate animation and offset the starting time of each item so they slide in top first then next row and so on. My question is where to perform this animation? I was thinking in the getView method of the adapter I have overridden. Is this how I would go about doing this?
Upvotes: 1
Views: 2031
Reputation: 31779
Well you could use the method 'setLayoutAnimation' of the listview. This will take an animation controller. It basically calls the animation for each child of a viewgroup when its laid out on the screen.
listview.setLayoutAnimation(new LayoutAnimationController(YOUR ANIMATION OBJECT));
There is domo for this in the apiSamples. It will give you more idea.
Upvotes: 4