-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
[Suggestion] Implementing gifs for splash screen #67
Comments
@itsyogesh Hi π Sorry I'm not a big fan of gif because the ratio weight / image quality is horrible π But you can create a continuity between the splash screen and the logo animation, like in the example project and use use Lottie with react-native-lottie to create kick-ass animations (instead of |
Hey, yup I agree completely with the image quality (and the size for good quality ones), but you gotta start somewhere π . What I can't seem to wrap my head around is how would you go about building that continuity screen, the one you show after the splash. Okay so after some digging, I did find that we could use Lottie directly as an XML (http://airbnb.io/lottie/#/android?id=from-xml), is there a way we could use that as a basis for the For iOS, I have no clue at all, from the article it seems that in the Bootsplash Controller I hope I am making some sense. I have zero experience with native dev so all these questions might seem rudimentary or out of place. |
@itsyogesh I would recommend not to implement them on the native side, it's too much complexity for a very small gain. I will create a small repository tomorrow using an animation from https://lottiefiles.com so you can understand how it can be done π |
Oh interesting, so my only worry with doing it on the JS side was that the time taken to load the JS bundle would be unpredictable and the animation won't start until the bundle is loaded. Do you think the asset loading would make it instant? |
@itsyogesh As I know, it's possible to reference assets from |
@itsyogesh I published it here: https://github.com/zoontek/react-native-bootsplash-lottie-example Unfortunately, there currently no way to be sure that the animation is loaded in I published a video on Youtube (1080p encoding is still processing for now): https://www.youtube.com/watch?v=8Mgqk05O-4w |
@itsyogesh Is this solution OK for you? π |
π» My environment
π΅οΈββοΈ Reproducing the issue
Explain what you did, what you expected to happen, and what actually happens.
Provide some code or screenshots if needed.
This is more of a suggestion, so I am not sure if this the right way to address it, but I am trying to create a splash screen gif animation. I've gone through the documentation and its pretty clear that on iOS we can't really have a controller assigned to a xib or launch screen storyboard. What I was thinking, and do correct me if I am wrong, is there a way to maybe take the user to a different UIView to load the gif animation and that acts as the default splash screen.
The reason why I don't want to move this to the native side is that I am not sure about the time it'll take for the JS bundle to load and grabbing the first frame of the gif to act as a splash screen and only show the gif on the JS side might be really tricky from a usability standpoint.
π€Solution
For iOS, here is an implementation article I found. https://www.amerhukic.com/animating-launch-screen-using-gif
For android, maybe we could use like a gif view drawable to handle that, something like this. https://github.com/koral--/android-gif-drawable
I have no clue about the implementation details of this, so I am just looking at some ideas around how we can tackle this issue.
P.S Thank you for building this lib, it has really helped out making RN apps on par with the native ones.
The text was updated successfully, but these errors were encountered: