私はこれに従って、DevBytes:Window Animationsを実行して、アクティビティを切り替えるときにアニメーションとして変換を実装します。
ユーザーがSUBACTIVITYから戻るボタンを押してMAINACTIVITYに移動したときのアニメーションを除いて、すべてが正常に機能しています。MAIN ACTIVITYがスライドすると、SUBACTIVITYの下に表示され、その上に配置したいと思います。
overridePendingTransition()
ユーザーがメインアクティビティに戻ったときにアニメーションを作成するために使用します。
overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_right);
slide_in_right.xml:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="-100%p" android:toXDelta="0"
android:duration="3500" />
</set>
slide_out_right.xml:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0" android:toXDelta="50%p"
android:duration="3500" />
</set>
メインアクティビティが一番上になるように、アニメーション中にウィンドウを並べ替えるにはどうすればよいですか?