How to go to the next activity in Android

I have three views main1.xml, main2.xml, main3.xml. I put three buttons in main.xml. When the user clicks the first button, I want it to display main1.xml, and if the second button displays main2.xml, etc. I have completed the main.xml file

How do I change the view?

resolvent:

It's very simple. You just need to use intent

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

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>