1. Create, configure activity
1.Android offers a lot of activity classes
Accountauthenticatoractivity, Activity (tabactivity), listactivity (launcheractivity,preferenceactivity), aliasactivity,expandablelistactivity);
2. Once the activity is established, remember to configure it in the configuration file
2. Activate shutdown activity
There are boot methods with return and no return values, and closing methods for shutting yourself down and closing others
3. Use bundles to transfer data between activity
bundle.put*** (String key,*** data); Bundle.putserializable (String key,serializable data); (Serializable object)
The 4.Activity life cycle basically follows the callback mechanism, and the corresponding method is called when the activity enters a state.
5.Inent has component,action,category,data,type,extra,flag seven properties
1.Component property to receive a ComponentName object
2.intent.setcomponent (ComponentName object);
can also be simplified to intent intent = new Intent (... this,。。。. class);
SetClass method was also found after android3.0.
When a program starts a component with the component property of the intent, the component that is launched is rarely required to be configured with Intentfilter
Action,category and Intent-filter Configuration
In my opinion, the method of starting a component through Setaction and addcastegory is mostly used when invoking the activity of the system, which requires the Intent-filter configuration of the component to be launched in the configuration file.
Data,type Properties and Intent-filter configuration
The Data property is used to provide an action property to the action attribute, which receives a URI object, such as CONTENT://COM.ANDROID.CONTACTS/CONTACTS/1, the specified data type before the colon, and the data portion after the colon. The Type property is used to explicitly specify the kind or MIME type of the data specified by the DataSource property, and the Type property is generally valid when the intent does not specify an attribute
The extra property is used for data transfer Intent.putextras (bundles) between multiple activity.
Create a tab page using intent
Using the SetContent method of Tabhost.tabspec in Tabactivity, you can use the specified activity class as the tab page
Andorid Miscellaneous pen in-depth understanding activity,intenthe intentfilter