onDestroy() explanation (#20344)
Gave an instance of when the onDestroy call would be used in practice
This commit is contained in:
@ -43,7 +43,7 @@ An _activity_ is a component that has a user interface and represents a single s
|
|||||||
|
|
||||||
* onDestroy():
|
* onDestroy():
|
||||||
|
|
||||||
> The final call you receive before your activity is destroyed. This can happen either because the activity is finishing (someone called finish() on it, or because the system is temporarily destroying this instance of the activity to save space. You can distinguish between> these two scenarios with the isFinishing() method.
|
> The final call you receive before your activity is destroyed. This can happen either because the activity is finishing (someone called finish() on it, or because the system is temporarily destroying this instance of the activity to save space. You can distinguish between> these two scenarios with the isFinishing() method. This call is often used when the user hits the back button, or closes the instance of the app.
|
||||||
|
|
||||||
#### Sample code to understand Activity Lifecycle
|
#### Sample code to understand Activity Lifecycle
|
||||||
``` java
|
``` java
|
||||||
|
Reference in New Issue
Block a user