October 2018
Intermediate to advanced
464 pages
15h 17m
English
To shut down an activity, directly call its finish() method, which in turn calls onDestroy(). To perform the same action from a child activity, use finishFromChild(Activity child), where child is the calling subactivity.
It is often useful to know whether an activity is being shut down or merely paused, and the isFinishing(boolean) method returns a value that indicates which of these two states the activity is in.