跟
android:launchMode="singleTask"属性无关系
请禁用路由
ARouter.getInstance()
.build(Routes.Main.MAIN)
.withTransition(R.anim.activity_anim_in, R.anim.activity_anim_out).navigation()
正确做法是
val intent = Intent(
this@SplashActivity,
MainActivity::class.java
)
startActivity(intent)
overridePendingTransition(R.anim.activity_anim_in, R.anim.activity_anim_out)
R.anim.activity_anim_in
<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="1.0"
android:toAlpha="1.0"
android:duration="0" /></set>