[英]Blank screen before splash screen in Android
我从svn签出代码,并解决了运行时问题并运行应用程序。 然后对我来说,每次启动该应用程序都会出现空白屏幕,而对于其他应用程序却没有。
我在下面添加了行以修复运行时错误
aaptOptions {
cruncherEnabled = false
}
在您的styles.xml中添加以下主题并将其应用于启动活动
<style name="AppTranslucent" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
将此添加到您的style.xml中,
<style name="Theme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsTranslucent">true</item>
</style>
在清单文件中,在“启动画面”活动中将此样式称为android:theme =“ @ style / Theme.Transparent”
它将解决您的问题。
尝试这个。向您添加NoTitleBar主题Splash
<activity
android:name=".SplashScreenActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
/ >
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.