First, create a new activity
Ii. Implicit Intent
Specify a set of actions or data opening intent
Implicit intent: Open Other apps
Iii. Explicit Intent
By specifying a specific package name and class name
Explicit intent: applying an internal jump
Four, the character calculator
Explicit intent jump Interface (pass data)
Five, SMS Daquan
Implicit intent Jump Interface (pass data)
Six, SMS transmitter
The main interface to send SMS (Smsmanager, System upper application source), respectively, jump to select the number and SMS content interface, select the data back to the main interface
Callback data, multiple activity callback data, using the request code and return code to distinguish
Vii. Activity life Cycle
OnCreate: Creating
OnDestroy: Destruction
Onstart/onrestart: Interface Visible
OnStop: Interface not visible
Onresume: Controls on the interface get focus
OnPause: The control on the interface loses focus
Eight, the screen to switch activity life cycle
CTRL+F11 Simulator Toggle Screen
Activity configuration:
android:screenorientation= "Portrait"--Fixed to vertical screen
android:screenorientation= "Landscape"--fixed to horizontal screen
Nine, the concept of the task stack
A task stack for an application
X. Four types of activation modes of activity
Activity configuration startup mode: Launchmode
Singletop: Stack top only one
If the activity on the stack at the top of the task stack exists, it will not recreate the activity, directly reusing the existing activity, only one at the top of the stack. Application: Browser bookmarks
Singletask: The entire stack is only one (when reused, all other activity on its stack is cleared out of the stack)
When the activity is turned on, check that the stack is already present, and if it exists, it will be reused, and all other activity on the activity stack will be emptied, only one in the entire task stack . Application: Browser
SingleInstance: Create a single stack save
This mode activity runs on a separate stack, only one in the entire mobile phone operating system . Application: Call
Android Learning note "06"