i have four imageviews in a linear layout in such a manner that only three are shown at a time.
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator">
<translate
android:fromXDelta="0%"
android:toXDelta="-33%"
android:duration="500"
android:fillAfter="true" />
</set>
i m using this animation to move them from right to left. i have applied this animation to all the images in onFling method. but the problem is that they move to left side but immediately come back to its original position.
i want them to stay on their new positions.
and on swiping first time the first image should move out of the screen and fourth image should move in from right side of screen.
can anyone tell me how can i do this.
thanks
Here you go
You need to add
fillAfter=trueattributes to set.And most important thing why you embedding translate animation inside set?
Setis used when you want mixture of multiple kind of animations.