Open AliAkrem opened 1 month ago
One of the best issues I have read in a long time. Thanks @AliAkrem
Thank you @AliAkrem
@AliAkrem Thanks allot for the tutorial of gif in splash screen
I added all files and I am seeing my splash animation... But before animation starts i am seeing my launcher icon in splash screen I tried allot to remove it, but it's still showing
I am also seeing launcher icon first. Does anyone have a work around for this?
Hello, I found a way around it works in all androids except Android 11 for some reason.. I will send you code changes what i did
Also if you publish the code directly from that PR, App will crash on older android 11 and 10.I know this as ilI published my app on Play Store
On Thu, 14 Nov 2024, 5:23 am Paul Frank Allan, @.***> wrote:
I am also seeing launcher icon first. Does anyone have a work around for this?
— Reply to this email directly, view it on GitHub https://github.com/jonbhanson/flutter_native_splash/issues/734#issuecomment-2475059493, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6HWNWRXH7JWLHF4PZ5ZRQT2APQ7VAVCNFSM6AAAAABOUPSEI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZVGA2TSNBZGM . You are receiving this because you commented.Message ID: @.***>
Alternative Way to Implement Lottie or GIF Animation Without Any Flutter Package for Android
(Retain this section for users who may need a solution)
This guide explains how to add Lottie or GIF animations to your Android app without using any Flutter package. It demonstrates setting up animations directly in Android by configuring the
assets
folder, adding dependencies, and creating custom splash screens.Step 1: Add Your Animation to the Assets Folder
Ensure that you have an
/assets
folder atandroid/app/src/main/assets
. If it doesn’t exist, create it. Place your animation file (.json
for Lottie) in this folder, or place your.gif
file inandroid/app/src/main/res/raw
.Step 2: Add Required Dependencies
In your project’s
build.gradle
file, add the following dependencies:Step 3: Create the Splash Screen Layout
Next, create a
splash_screen.xml
file insideres/layout/
. This file will define the layout for your splash screen, depending on whether you’re using Lottie or GIF animation.For Lottie Animation:
Check out the official Lottie Android Documentation for more customization options.
For GIF Animation:
Step 4: Create
SplashActivity
Now, create a new
SplashActivity
to display the splash screen.For Lottie Animation:
For GIF Animation:
Step 5: Set
SplashActivity
as the Launcher ActivityTo ensure the splash screen is shown first when the app launches, configure
AndroidManifest.xml
:now build your app.