In Android, an activity represents an interface that uses intent to link different activities
Create a new project,
Create a new class class that is named New1activity.
Add a key to the XML
Add the following code in the Mainactivity.java
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/BD/wKiom1TdmzihzfvGAAD_8DcUU_c564.jpg "title=" 2.png " alt= "Wkiom1tdmzihzfvgaad_8dcuu_c564.jpg"/>
In Androidmanifest.xml, add the following code 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/59/BA/wKioL1TdmWjBO_ V8aahnlitqf5o593.jpg "title=" 1.png "alt=" Wkiol1tdmwjbo_v8aahnlitqf5o593.jpg "/>
Run the results, click
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/BA/wKioL1TdnOnAAkbwAACQzQ-Jqbg301.jpg "style=" float: none; "title=" 3.png "alt=" Wkiol1tdnonaakbwaacqzq-jqbg301.jpg "/>
Click the OK button to jump to another interface
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/BD/wKiom1Tdm_GwfvlLAACjYI226y0685.jpg "style=" float: none; "title=" 4.png "alt=" Wkiom1tdm_gwfvllaacjyi226y0685.jpg "/>
Resolve Intent Filter conflicts
Then create a new class, named New2activity, repeat the above steps, add code in Androidmanifest.xml, 650) this.width=650; "Src=" http://s3.51cto.com/ Wyfs02/m01/59/ba/wkiol1tdne3jb4phaaishqiarke431.jpg "title=" 1.png "alt=" Wkiol1tdne3jb4phaaishqiarke431.jpg "/>
Note that the names of New1 and New2 are different, but the intention is to have the same name in the selector,
In Mainactivity. Modify the code in Java to modify the intent to the name 650 in. xml) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/59/BD/ Wkiom1tdnxhtr2ttaaetcur-m1c709.jpg "title=" 2.png "alt=" Wkiom1tdnxhtr2ttaaetcur-m1c709.jpg "/>
Ps:intent parameters, directly using the class name, as above, can only invoke the activity of this project, using the intent of the selector alias, you can invoke any (can not this project) activity.
This article is from the "Useless Uncle" blog, please be sure to keep this source http://aslonely.blog.51cto.com/6552465/1614296
Android uses intent to link activity and intent filters