This article describes the solution to the problem of black screen when Android program starts. Share it for your reference, as follows:
About the black screen:
By default, there will be a black screen period when the program starts. The reason is that the first activity will load some data, such as initializing list data, sending requests to the server to obtain data, etc.
Removal method:
1. Add a style to the style:
<style name="ContentOverlay"parent="@android:style/"> <itemname="android:windowNoTitle">true</item> <itemname="android:windowIsTranslucent">true</item> <itemname="android:windowContentOverlay">@null</item> </style>
2. Set the theme to the theme that starts the activity
<application android:icon="@drawable/icon" android:label="@string/app_name" android:name=".TWeiboApplication" android:debuggable="true" android:theme="@style/ContentOverlay"> <activity android:name=".MainSplashActivity" android:configChanges="keyboardHidden|orientation" android:theme="@style/ContentOverlay"> <intent-filter> <actionandroid:name=""/> <categoryandroid:name=""/> </intent-filter> </activity>
The android interface switches black screen processing:
The black screen appears during the switching from A to B. You can change the theme of B in the Manifest file and add it to the theme:
<item name="android:windowIsTranslucent">true</item>
In this way, in the process from A to B, because B is transparent, the background is A. This kind of user experience is better.
For more information about Android related content, please check out the topic of this site:Android programming activity operation skills summary》、《Android View View Tips Summary》、《Summary of Android's SQLite database skills》、《Summary of Android operating json format data skills》、《Android database operation skills summary》、《Android file operation skills summary》、《A summary of SD card operation methods for Android programming and development》、《Android development introduction and advanced tutorial》、《Android resource operation skills summary"and"Android control usage summary》
I hope this article will be helpful to everyone's Android programming design.