当我们从一个activity跳到另一个activity时,需要调用intent意图

比如,从A跳到B就有

Intent intent = new Intent(A.this,B.class);

   startActivity(intent);

而当B又跳到C,而又想从C直接返回A,就可以调用finish()方法

在B的activity中

Intent intent = new Intent(B.this,C.class);

   startActivity(intent);

        finish();

在C的activity中的click()下

finish();

那么,在C中click()事件下可以直接返回到A

 

相关文章:

  • 2021-12-25
  • 2021-06-20
  • 2022-12-23
  • 2021-12-30
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案