Solution to the problem of white screen when Android App starts
After debugging on the phone, it will wait for a long time to turn on the screen after the first startup.
Set style, add the style to the activity, perfect solution
Refer to the following code. It can be solved (it is easy to use for personal testing)
<style name="SplashTheme" parent="AppBaseTheme"> <!-- WillsplashThe picture is set here,This image replaces the white screen --> <item name="android:windowBackground">@drawable/splash</item> <item name="android:windowFullscreen">true</item> <!-- 或者是Will主题设置成透明,Although clicking on the icon will cause a little lag,But the user experience does not affect --> <!-- <item name="android:windowIsTranslucent">true</item> --> <!-- No transparent background --> </style>
<!-- Then set the image to startActivity --> <activity android:name="." android:theme="@style/SplashTheme" android:screenOrientation="portrait"> <intent-filter> <action android:name="" /> <category android:name="" /> </intent-filter> </activity>
The above is a detailed explanation of the examples of the solution to launch a white screen on Android App. If you have any questions, please leave a message or go to the community of this site to communicate and discuss. Thank you for reading. I hope it can help you. Thank you for your support for this site!