Try svg format On Fri, Jan 1, 2021, 11:55 PM Adeel Memon <[email protected]> wrote:
> Try image as svg > > On Fri, Jan 1, 2021, 11:32 PM Luca Bertoncello <[email protected]> > wrote: > >> Hi list! >> >> First of all: happy new year! >> Then, to my problem... >> >> I'm developing an App for Android. The App works, but needs some time to >> initialize, so I decided to add a Splash Screen to the App. >> This is my code: >> >> AndroidManifest.xml: >> <activity >> android:name=".MainActivity" >> android:configChanges="orientation|screenSize" >> android:theme="@style/AppTheme.Launcher"> >> <intent-filter> >> <action android:name="android.intent.action.MAIN" /> >> >> <category android:name="android.intent.category.LAUNCHER" >> /> >> </intent-filter> >> </activity> >> >> MainActivity.java: >> @Override >> protected void onCreate(Bundle savedInstanceState) >> { >> setTheme(R.style.AppThemeNoTitle); >> super.onCreate(savedInstanceState); >> setContentView(R.layout.activity_main); >> ... >> } >> >> styles.xml: >> <style name="AppTheme.Launcher"> >> <item >> name="android:windowBackground">@drawable/launch_screen</item> >> </style> >> >> launch_screen.xml: >> <?xml version="1.0" encoding="utf-8"?> >> >> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >> android:opacity="opaque"> >> >> <item android:drawable="@android:color/white"/> >> >> <item> >> <bitmap >> android:src="@drawable/splash" >> android:gravity="center"/> >> </item> >> >> </layer-list> >> >> and of course splash.png is the image to display (768x1024 8-bit/color >> RGB, non-interlaced). >> >> The code works on my mobile phone (Moto G5), on all emulators (even with >> API 21 - Android 5), on many test devices with Android 6, 8, 9 and 10. >> Only on my Tablet (Lenovo TAB S8-50L) the Splash Screen will not be >> displayed at all. >> Logcat doesn't show any error. The App just starts (nothing displayed) >> and when initialisation are done, the main Screen will be displayed and >> I can use the App. But no Splash Screen... >> >> Has someone an idea what can be the problem or at least how can I search >> it? >> >> Thanks a lot >> Luca Bertoncello >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Android Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/android-developers/e76f29c4-cba2-dbb1-7ee2-1a2dc4de5bcb%40lucabert.de >> . >> > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/CANKrxQ%2BMX4zuXH7NruuD06oo1gm-Lkw%3DAJeWMLR158zLDFa5%3DA%40mail.gmail.com.

