0
每次在我的android应用程序启动有一个白色的窗口几秒钟。我在我的应用程序中有一个启动画面,我想要显示而不是此白色屏幕。我已经将windowDisablePreview设置为true,但它不起作用。如何解决这个问题。
真正无法隐藏android启动与android的白色窗口:windowDisablePreview
Android清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ankitsrivastava.recyclerview">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<!--Splash Screen-->
<activity
android:name=".app.SplashScreen"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--Main Activity-->
<activity android:name=".app.MainActivity">
</activity>
</application>
Styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowDisablePreview">true</item>
</style>
检查你是否正在加载一个大的图像作为背景飞溅或你正在做onCreate/onResume飞溅一些重任务。将其放入PostDelayed或稍后加载。 – Naeem