1.平移
activity_next_enter
<?xml version="1.0" encoding="utf-8"?><translate xmlns:android="/apk/res/android"android:duration="300"android:fromXDelta="100%p"android:toXDelta="0"></translate>
activity_next_exit
<?xml version="1.0" encoding="utf-8"?><translate xmlns:android="/apk/res/android"android:duration="300"android:fromXDelta="0"android:toXDelta="-100%p"></translate>
activity_up_enter
<?xml version="1.0" encoding="utf-8"?><translate xmlns:android="/apk/res/android"android:duration="300"android:fromXDelta="-100%p"android:toXDelta="0"></translate>
activity_up_exit
<?xml version="1.0" encoding="utf-8"?><translate xmlns:android="/apk/res/android"android:duration="300"android:fromXDelta="0"android:toXDelta="100%p"></translate>
调用进入
...overridePendingTransition(R.anim.activity_next_enter, R.anim.activity_next_exit);super.onCreate(savedInstanceState);
调用退出
finish();overridePendingTransition(R.anim.activity_up_enter, R.anim.activity_up_exit);
如果觉得《Activity进入退出动画》对你有帮助,请点赞、收藏,并留下你的观点哦!