Enter the platform-tools directory in Android-sdk
Execute the following command in the command line
adb shell dumpsys activity>
The current four components can be used
(Activity,Service,BroadCase,ContentProvider)
Print the existence of the file in the current directory
Then go to the print file search:
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Supplementary knowledge:Solution to the problem that the previous activity was destroyed when another activity was opened
In development, an Activity needs to be displayed in full screen by default. So after starting Activity in an Activity, it returns and finds that the previous Activity has been destroyed and data will be requested again.
The way to set the horizontal screen here is to configure it in:
<style name="FullScreenTheme" parent="AppTheme" > <item name="android:windowNoTitle">true</item> <item name="android:windowFullscreen">true</item> </style>
Solution:
Instead of using the above configuration method, the onCreate method of the Activity that requires full screen display in horizontal screen
setContentView(.activity_main)Call the following code before the method to set full screen //Remove titlerequestWindowFeature(Window.FEATURE_NO_TITLE);
//Remove the status bar on the ActivitygetWindow().setFlags(.FLAG_FULLSCREEN, .FLAG_FULLSCREEN);
The above article to check whether the current Activity is destroyed in Android is all the content I have shared with you. I hope it can give you a reference and I hope you can support me more.