Block the default animation for startActivity

后端 未结 1 1559
有刺的猬
有刺的猬 2021-02-03 13:29


Me started an activity like this

Intent mainIntent = new Intent(v.getContext(), Second.class);
startActivity(mainIntent);
overridePendingTransition(andro         


        
1条回答
  •  误落风尘
    2021-02-03 14:25

    You can prevent the default animation by setting flag FLAG_ACTIVITY_NO_ANIMATION
    like this

    mainIntent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
    

    0 讨论(0)
提交回复
热议问题