1

I used these below codes for right to left transition.

<set xmlns:android="http://schemas.android.com/apk/res/android"
     android:shareInterpolator="false">
 <translate xmlns:android="http://schemas.android.com/apk/res/android"
        android:duration="500"
        android:fromXDelta="-100%"
        android:toXDelta="0%" >
    </translate>
</set>

and these below codes for left to right

 <set xmlns:android="http://schemas.android.com/apk/res/android"
     android:shareInterpolator="false">
  <translate xmlns:android="http://schemas.android.com/apk/res/android"
        android:duration="500"
        android:fromXDelta="100%"
        android:toXDelta="0%" >
    </translate>
</set>` 

it works fine with this overridePendingTransition(R.anim.rtol, R.anim.ltor);

BUT, it shows a black screen when doing transition and not smooth. Any helpful answer will be appreciated.

Mosharrof Rubel
  • 106
  • 2
  • 7
  • check this link for commonsware's answer on the existing animations in android open source project http://stackoverflow.com/questions/1274657/android-how-to-get-android-r-anim-slide-in-right – Randroid May 28 '15 at 09:58

1 Answers1

2

Have you tried android default Transitions that are already available in android.

For example

@android:anim/slide_in_left

and

@android:anim/slide_out_right
Vishwajit Palankar
  • 3,033
  • 3
  • 28
  • 48
N J
  • 27,217
  • 13
  • 76
  • 96