活动 调用startActivity() finish()时候后面加上overridePendingTransition(R.anim.default_anim_in, R.anim.default_anim_out);
default_anim_in
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:duration="300"
android:fromXScale="0.1"
android:fromYScale="0.1"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="1"
android:toYScale="1"/>
<alpha
android:duration="300"
android:fromAlpha="0"
android:toAlpha="1.0"/>
</set>
default_anim_out
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:duration="300"
android:fromXScale="1"
android:fromYScale="1"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="0.6"
android:toYScale="0.6"/>
<alpha
android:duration="300"
android:fromAlpha="1"
android:toAlpha="0"/>
</set>
效果可以自己改,感觉怎么丝滑怎么来
这就是正常跳转啊,怕是你在界面里做了啥耗时操作吧。
Intent intent = new Intent(this, TestView.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
这样试试
我刚开始也不适应,可能看多了就好了?跳转界面一般都是用startActivity的