I have a click button on first activity and when we click on that button then I want to animate second activity but in my case my first activity also animated with second here is code
Intent createCompaignActivityIntent = new Intent(mActivity, CreateCompaignActivity.class);
mActivity.startActivity(createCompaignActivityIntent);
mActivity.overridePendingTransition( R.anim.slide_in_up, R.anim.slide_out_up );
slide_in_up.xml
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="100%p" android:toYDelta="0%p"
android:duration="@android:integer/config_longAnimTime"/>
slide_out_up.xml
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="0%p" android:toYDelta="-100%p"
android:duration="@android:integer/config_longAnimTime"/>