Sounds great until you realise that if you were using an Activity or Fragment to show a splash screen then you would have the default Android 12 splash screen show up first then your custom splash screen follows. By default all apps on Android 12 will show a splash screen with the app icon at the centre. Here comes API level 31Īndroid 12 came along and a new Splash Screen API was added. This means even when the content activity was already created before it would still show a splash screen which can be annoying to users. This gives you all the flexibility you’d ever need but it would still display the splash screen even when the app hot starts. The natural solution to this was using an Activity or Fragment to display your animated screen then navigating away after it’s done. ![]() ![]() ![]() But this lacks the flexibility of having animated splash screen and it was honestly kind of hard to make sure your your drawable scales properly throughout all API levels. Using the android:windowBackground attribute inside your theme is the basic form of a splash screen in Android where you would position an icon on the window background of your app and after the application loads it is covered by content. For years Android Devs have always resorted to using a windowBackground or Activity or Fragment for their splash screen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |