Previous: http://www.bkjia.com/kf/201208/148861.html
In this example, ListView displays the list items from bottom to top (Reverse Order. The usage of this example is described in the Android ApiDemos example (95): Views-> Animation-> 3D Transition:
Let's take a look at the definition of @ anim/layout_bottom_to_top_slide:
[Html]
<LayoutAnimation xmlns: android = "http://schemas.android.com/apk/res/android"
Android: delay = "130%"
Android: animationOrder = "reverse"
Android: animation = "@ anim/slide_right"/>
<LayoutAnimation xmlns: android = "http://schemas.android.com/apk/res/android"
Android: delay = "130%"
Android: animationOrder = "reverse"
Android: animation = "@ anim/slide_right"/>
LayoutAnimation can be defined as follows:
Delay: defines the animation start delay time for each subview.
AnimationOrder: the order of enumerative Layout subviews. It can be normal (forward), reverse (reverse), or random (random order ).
Animation: the animation effect used by each sub-View. In this example, @ anim/slide_right is used to move the text from left to right.
Interpolator: The frame interpolation algorithm defines the animation change rate. The display of each frame of the animation can be accelerated, slowed down, repeated display, and so on.
@ Anim/slide_right is defined as follows:
<Set xmlns: android = "http://schemas.android.com/apk/res/android"
Android: interpolator = "@ android: anim/accelerate_interpolator">
<Translate android: fromXDelta = "-100% p" android: toXDelta = "0 ″
Android: duration = "1000"/>
</Set>
Modified the duration value for 1 second to make it easier to see the animation effect.