Posts

Showing posts with the label Splash Screen

Adding A Splash Screen To Flutter Apps

Image
Answer : I want to shed some more light on the actual way of doing a Splash screen in Flutter. I followed a little bit the trace here and I saw that things aren't looking so bad about the Splash Screen in Flutter. Maybe most of the devs (like me) are thinking that there isn't a Splash screen by default in Flutter and they need to do something about that. There is a Splash screen, but it's with white background and nobody can understand that there is already a splash screen for iOS and Android by default. The only thing that the developer needs to do is to put the Branding image in the right place and the splash screen will start working just like that. Here is how you can do it step by step: First on Android (because is my favorite Platform :) ) Find the "android" folder in your Flutter project. Browse to the app -> src -> main -> res folder and place all of the variants of your branding image in the corresponding folders. For example: th...

Android Display Splash-Screen While Loading

Answer : You should not be creating a new thread on startup, instead you should create a view that does not have to wait for your resources to load, as detailed in this article: Splash Screens the Right Way. As stated in the article, you should create a layer-list drawable instead of a layout XML file: <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Fill the background with a solid color --> <item android:drawable="@color/gray"/> <!-- Place your bitmap in the center --> <item> <bitmap android:gravity="center" android:src="@mipmap/ic_launcher"/> </item> </layer-list> Then create a theme using the drawable file as a background. I use the background attribute instead of the windowBackground attribute as suggested in the article, because background takes the status and navigation bars into account, centerin...