Make new activity appear behind old one during transition

前端 未结 3 1157
有刺的猬
有刺的猬 2020-11-29 20:23

What I\'m trying to achieve is to override the start activity animation.

The animation should give the impression that the old activity is on top of the new activity

3条回答
  •  猫巷女王i
    2020-11-29 21:01

    The solution that works for me:

    R.anim.exit_slide_down

      
    
        
    
    

    ...and then

    Intent intent = new Intent(activity, SecondActivity.class);
    startActivity(intent);
    activity.overridePendingTransition(0, R.anim.exit_slide_down);
    

提交回复
热议问题