Android review (six) core components-> Activity

1. You can declare permissions on the activity to ensure that you only have certain permissions when entering an activity

 <manifest>
    <activity android:name="...."
       android:permission=”com.google.socialapp.permission.SHARE_POST”

    />

  

2. Life cycle flowchart

  

 
 

 

 

3. Activity status and pop up in memory

  The system will never directly terminate the Activity to release memory, but will terminate the process where the Activity is located. The system will not only destroy the Activity, but also destroy all other content running in the process.

 

 

The possibility of the system terminating the process Process status Activity status
small Front desk (own or have focus) Created,
started,
restored
in Backstage (lost focus) Paused
Big Background (not visible) stopped
air Destroyed

Guess you like

Origin www.cnblogs.com/developer-wang/p/12744604.html