On Android, how do you switch activities programmatically?

前端 未结 8 911
盖世英雄少女心
盖世英雄少女心 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:41

    startActivity (new Intent (Thisactivity.this, Nextactivity.class));
    

    Don't forget to add activity to your manifest

    
                                                            
提交回复
热议问题