Question

What is the different between R.anim.slide_left_in and R.anim.slide_left_out and also, R.anim.slide_right_in and R.anim.slide_right_out
I have the following xml for slide_left_in

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:shareInterpolator="false" >

    <translate
        android:duration="700"
        android:fromXDelta="-100%"
        android:fromYDelta="0%"
        android:toXDelta="0%"
        android:toYDelta="0%" />

</set>
Was it helpful?

Solution

They are named pretty descriptively...

R.anim.slide_left_in will slide the view in from the left.

R.anim.slide_left_out will slide the view out to the left.

Same thing for the right ones but in the opposite direction.

EDIT:

R.anim.slide_left_out

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:shareInterpolator="false" >

    <translate
        android:duration="700"
        android:fromXDelta="0%"
        android:fromYDelta="0%"
        android:toXDelta="-100%"
        android:toYDelta="0%" />

</set>

The right out/in ones will be roughly the same as the left ones but with positive 100% instead of negative.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top