打开: val intent = Intent(context, FlutterAppActivity::class.java) intent.action = Intent.ACTION_RUN intent.putExtra(EXTRA_PARAMS, map as Serializable) intent.putExtra("route", router) context.startActivity(intent, ActivityOptions.makeCustomAnimation(context as Activity?, R.anim.right_enter, 0).toBundle()) 关闭: override fun finish() { super.finish() overridePendingTransition(0, R.anim.right_eixt) } R.anim.right_eixt <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/decelerate_interpolator" > <translate android:duration="250" android:fromXDelta="100%" android:toXDelta="0" /> </set> R.anim.right_eixt <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/decelerate_interpolator" > <translate android:duration="250" android:fromXDelta="0" android:toXDelta="100%" /> </set>
标签:anim,eixt,动效,right,intent,context,finish,flutter,页面 From: https://www.cnblogs.com/baiyi168/p/18472398