start activity with intent
This address: Http://blog.csdn.net/caroline_wendy
To dynamically correlate the activity interface , use intent to start . flexibility to bind .
In the intent static class . Define the contents of the intent:
public static final String action_home = "Me.cxxxyx.CxxxyxIntent.ACTION_HOME";
the
startactivity (intent) other activity is then initiated via intent:
Intent Intent = new Intent (); intent.setaction (cxxxyxintent.action_home); startactivity (Intent);
you need to register the corresponding filter in the
androidmanifest :
<activity android:name= "me.cxxxyx.hwdxxxxx.HomePageActivity" android:screenorientation= "Portrait" android:launchmode= "Singletask" android:theme= "@style/cxxxyxhw.activity" > <intent-filter > <action android:name= "Me.cxxxyx.CxxxyxIntent.ACTION_HOME"/> <category android:name= " Android.intent.category.DEFAULT "/> </intent-filter> <intent-filter> <action Android:name= "Android.intent.action.VIEW"/> <category android:name= "Android.intent.category.DEFAULT" /> <data android:scheme= "Cxxxyx" android:host= "launch" android:pathpattern= "Home"/ > </intent-filter> </activity>
It is able to
jump interface (Activity).
Android-activate activity via intent