-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Lottie or GIF Animation Without Any Flutter Package for Android #734
Comments
One of the best issues I have read in a long time. |
Thank you @AliAkrem |
@AliAkrem I added all files and I am seeing my splash animation... |
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
<#734 (comment)>,
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.
The text was updated successfully, but these errors were encountered: