Android activity recreate itself

后端 未结 13 1514
攒了一身酷
攒了一身酷 2021-02-05 07:06

My app normally works just fine, until I face a strange problem on specific device. There are 2 activities in App. After I start ActivityB inside of ActivityA, ActivityA starts

相关标签:
13条回答
  • 2021-02-05 07:53

    Perhaps you should use

    Intent startIntent = new Intent(view.getContext(), ActivityB.class); 
    startActivity(startIntent); 
    finish() ;
    

    And

    Intent startIntent = new Intent(view.getContext(), ActivityA.class); 
    startActivity(startIntent); 
    finish() ;
    

    each time you go back or forward.

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