start activity with intent
This address: Http://blog.csdn.net/caroline_wendy
In order to dynamically correlate the activity interface , using intent to start , you can bind flexibly .
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 appropriate 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>
that is, you can jump to the
interface (Activity).
Android-activate activity via intent