アンドロイドアプリが起動するたびに、数秒間白いウィンドウが表示されます。私はこの白い画面の代わりに表示したい私のアプリにスプラッシュ画面を持っています。私はwindowDisablePreviewをtrueに設定しましたが、動作しません。この問題を解決する方法。
真アンドロイドを使ってアンドロイドを起動して白いウィンドウを非表示にすることができません: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