I have an Android app in which nine of the activities do not load a layout file. Their views are private classes which extend the View class. The activity construct view obj
this.overridePendingTransition(android.R.anim.slide_in_left,
android.R.anim.slide_out_right);
write it just below of your Intent.
Try thoses
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="@android:integer/config_longAnimTime"
android:fromXDelta="0"
android:fromYDelta="0"
android:interpolator="@android:anim/linear_interpolator"
android:toXDelta="-100%"
android:toYDelta="0" />
</set>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="@android:integer/config_longAnimTime"
android:fromXDelta="100%"
android:fromYDelta="0"
android:interpolator="@android:anim/linear_interpolator"
android:toXDelta="0"
android:toYDelta="0" />
</set>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="@android:integer/config_longAnimTime"
android:fromXDelta="-100%"
android:fromYDelta="0"
android:interpolator="@android:anim/linear_interpolator"
android:toXDelta="0"
android:toYDelta="0" />
</set>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="@android:integer/config_longAnimTime"
android:fromXDelta="0"
android:fromYDelta="0"
android:interpolator="@android:anim/linear_interpolator"
android:toXDelta="100%"
android:toYDelta="0" />
</set>
And in the code when doing StartActivity()
overridePendingTransition(R.animator.anim_left, R.animator.anim_right);
and then when doing finish()
overridePendingTransition(R.animator.anim_left, R.animator.anim_right);