(Android review) explicit and implicit intent Activation
I. Basic knowledge points
1,
Label attribute: the title of an Acivity.
2. Do not introduce the R file into an error.
3. intent. setClass (this, Main2Activity. class );
First parameter: Context
Second parameter: the bytecode file of the component to be activated
4. Explicit activation (explicitly specifying the component to be activated)
1) intent. setClass (this, Main2Activity. class );
2) intent. setClassName (this, "com. njupt. multiactivity. Main2Activity ");
Second parameter: The full Class Name of the component to be opened
3) intent. setClassName (getPackageName (), "com. njupt. multiactivity. Main2Activity ");
GetPackageName (): Get AndroidManefest Value of the package attribute under the node
4) intent. setComponent (new ComponentName (this, Main2Activity. class ));
5) Intent intent = new Intent (this, Main2Activity. class );
5, Android: onClick = "open"/>
Multiple controls can stimulate the same event handler function.
6. Implicit intent activation (this is what we did before activating the browser)
1)