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

后端 未结 2 753
南笙
南笙 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:06

    if your Gallery.java is an activity you could start it by calling startActivity(new Intent(this, Gallery.class));

提交回复
热议问题