我的背景圖片是一個PNG 375×667
請注意,我在未使用setContentView()
我的活動的onCreate()
我純粹是做一個主題
的用途使用正常活動的佈局,用戶將看到一個空白的黑屏2-3秒纔可以看到啓動畫面,他們啓動應用程序==>第一時間不我想
我需要的閃屏圖像顯示立即在用戶打開應用程序時
有些人使初始屏幕透明,這意味着用戶將看到什麼也沒有發生2-3秒首次==>不可接受我的OutOfMemoryError - 層列表圖像背景
的Manifest.xml
<activity
android:name=".views.activities.SplashActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="@style/SplashTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
styles.xml
<style name="SplashTheme" 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">false</item>
<item name="android:background">@drawable/bg_splash</item>
</style>
bg_splash.xml
<item
android:drawable="@android:color/black"/>
<item
android:drawable="@drawable/splash_full_tiny"
android:gravity="center">
</item>
這只是發生了幾個設備:
- 沃達豐智能超6
- A1601(辰)
- SM-A800I(三星)
我覺得你在呼喚3秒的延遲,你可以在你的java代碼檢查? – kgsharathkumar
也許嘗試 看看是否有幫助。 –
rookiedev