Android implements the method to close all activities when exiting
•
Android
This example implements the function of closing all activities when Android exits. It is shared for your reference. The specific methods are as follows:
Generally speaking, some activities may not be closed when Android exits. In order to close all activities when Android exits, the following classes are given here:
Then add a sentence in the oncreate (bundle savedinstancestate) method of each activity in the application:
When the application exits:
In this way, all activities of the application can be completely closed when exiting the application.
I believe this article has a certain reference value for everyone's Android program design.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码