What I use:
activity_stay.xml
<?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:fromYDelta="0%p"
android:toYDelta="0%p" />
</set>
activity_slide_to_bottom.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_decelerate_interpolator">
<translate
android:duration="@android:integer/config_longAnimTime"
android:fromYDelta="0"
android:toYDelta="100%p" />
</set>
activity_slide_from_bottom.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_decelerate_interpolator">
<translate
android:duration="@android:integer/config_longAnimTime"
android:fromYDelta="100%p"
android:toYDelta="0" />
</set>
Start NewActivity:
startActivity(NewActivity.getIntent(this))
overridePendingTransition(R.anim.activity_slide_from_bottom, R.anim.activity_stay)
NewActivity finish():
finish()
overridePendingTransition(R.anim.activity_stay, R.anim.activity_slide_to_bottom)
When NewActivity is started OldActivity disappear - I see blank white screen above which NewActivity slide to top. However what I need is my NewActivity sliding to top above the OldActivity content when started. How can I achieve this?
UPD: when I finish my NewActivity for some reasons all animations execute perfectly: NewActivity slide to bottom with OldActivity content appearing below NewActivity content.
@android:integer/config_longAnimTime
– Theoretics