How do I open an Activity in button's onClick()?

后端 未结 2 755
南笙
南笙 2021-01-21 18:25

I have two Activitys, named App and Gallery.

App contains frontend buttons and functionalities, Gallery

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-21 19:12

    Use an Intent

     Intent  intent  = new Intent(this,Gallery.class);
     intent.putExtra(,);
     startActivity(intent);
    

提交回复
热议问题