1. Implement conversion between two interfaces
In Android, the most common is to press the button and then jump to the second interface.
The key code is simple:
This is taking the BN2 button as an example, the current activity is mainactivity, jump to registration.
1Button BN2 =(Button) Findviewbyid (R.ID.BN2);2Bn2.setonclicklistener (NewOnclicklistener ()3 {4 Public voidOnClick (View v)5 {6Intent Intent2 =NewIntent (mainactivity. This,7Registration.class);8 //activate the intent corresponding activity9 startactivity (intent2);Ten } One});
To pull away again:
New Intent (mainactivity. this, registration. class ); // activate the intent corresponding activity StartActivity (Intent2);
2. There is also a more important point, which I have often overlooked.
To register a second activity in Androidmanifest.xml. Let's take resultactivity as an example:
< Activity Android:name = "Com.example.personalmanager.ResultActivity" android:label= "confirmation message"> </ Activity >
Android implements two page jumps