react-native-splash-screen icon indicating copy to clipboard operation
react-native-splash-screen copied to clipboard

animated splash screen

Open Shivani12345 opened this issue 6 years ago • 7 comments

i want animated splash screen i.e i want perform animations like rotate,fade animation on multiple images in launch_screen.xml. please help me

Shivani12345 avatar Feb 12 '19 06:02 Shivani12345

This library doesn't support it yet that I know, you can make a PR

ishigamii avatar Feb 12 '19 10:02 ishigamii

@ishigamii i thinking to do a pull request in near future, are you allowing third party library like this?

dengue8830 avatar Feb 15 '19 11:02 dengue8830

@dengue8830 I am not the owner of this lib you should ask @crazycodeboy

ishigamii avatar Feb 15 '19 12:02 ishigamii

Here it is how i achieved fade animation on android: https://github.com/kirillpisarev/react-native-splash-screen/commit/fea53324a570d1766dce05f5c4739cfd0a1f37cb

kirillpisarev avatar Apr 23 '19 10:04 kirillpisarev

I might be coming to this conversation way later but I kinda find a way better way around the animation

<resources>
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowEnterAnimation">@anim/slide_in</item>
    </style>
    <style name="SplashScreenTheme" parent="SplashScreen_SplashTheme">
        ....
        <item name="android:windowAnimationStyle">@style/SplashScreenThemeAnimation</item>
    </style>
    <style name="SplashScreenThemeAnimation">
        <item name="android:windowExitAnimation">@anim/slide_out</item>
        <item name="android:windowEnterAnimation">@anim/slide_in</item>
    </style>
</resources>

anim/slide_in.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <translate
        android:fromXDelta="100%p"
        android:duration="250"
        android:interpolator="@android:anim/decelerate_interpolator"
        android:toXDelta="0" />
    <alpha
        android:fromAlpha="1"
        android:duration="250"
        android:toAlpha="1"/>
</set>

anim/slide_out.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <translate
        android:fromXDelta="0"
        android:duration="250"
        android:interpolator="@android:anim/decelerate_interpolator"
        android:toXDelta="-100%p" />
</set>

Quadriphobs1 avatar Jul 06 '20 15:07 Quadriphobs1

@kirillpisarev will you change go to main branch? PR may be?

ahtokca avatar Sep 09 '21 16:09 ahtokca

you can use Lottie, in launch_screen.xml like:

<com.airbnb.lottie.LottieAnimationView
		android:layout_width="280dp"
		android:layout_height="50dp"
		android:layout_centerInParent="true"
		android:visibility="visible"
		app:lottie_autoPlay="true"
		app:lottie_loop="false"
		app:lottie_rawRes="@raw/animated"
		tools:visibility="visible"></com.airbnb.lottie.LottieAnimationView>

read more in Lottie docs

erickcrus avatar Jul 21 '23 22:07 erickcrus