On Android, how do you switch activities programmatically?

前端 未结 8 895
盖世英雄少女心
盖世英雄少女心 2020-12-01 06:29

It seems like every example I can find of switching between activities involves creating an Intent and passing in the context of a View via an OnClickListener associated wit

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-01 06:33

    I have the shortest Version

    startActivity(new Intent(CurrentActivity.this,ActivityYouWantToOpen.class));
    

提交回复
热议问题