Used VB, vc# friends know that in VB or vc# in the window (interface) to switch is easy
For example, in VB, C #:
There are Fom1, Form2, FORM3, if you want to switch.
Quite simply, it was really "difficult" to do so in Android. You have to use your brain.
Based on my previous programming experience, I offer a simple solution here.
The first step is to create a new project, such as "UITest".
The second step is to transform the code file of this project
Open the "Uitestactivity.java" file. Delete the inside part of the code.
Remove the Setcontentview line. This way, the program will not automatically main.xml the interface.
The third step to the interface packaging combination
1 XML interface files with a Java file
First we will main.xml this layout interface to "packaging"
So after packing is finished, we return to Uitestactivity.java this file
See no, is not very feel like VB or vc#. Oh
Step fourth Create a new XML interface (Phone.xml)
After the interface is well laid out, create a new class file Frmphone.java
Once this step is done, we go back to the main interface and add a "button" inside it.
When the button control is added, go to the Frmmain.java and bind the event for this button
Now test run to see. Click on "Open Frmphone" on the main screen to open the phone interface.
After clicking, the program jumps to the Phone.xml interface.
Now you can get back to the main interface by binding an "event" to the "Back" button.
Test to see if it is already free to jump directly in the interface. And much like VB or vc#.