You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/10/17 17:47:26 UTC

[GitHub] [cordova-plugin-splashscreen] breautek commented on issue #155: Is it planned to support animation / video in the splash screen?

breautek commented on issue #155:
URL: https://github.com/apache/cordova-plugin-splashscreen/issues/155#issuecomment-711055985


   Launch screens can only be a static [drawable](https://developer.android.com/guide/topics/resources/drawable-resource).
   
   While Android framework supports multiple formats, including gifs (which can support animations), they get converted to a bitmap drawable. Therefore you can't have animations during the launch screen.
   
   Additionally, the launch screen isn't part of the webview, so you can't use CSS.
   
   This is the limitations of the Android OS itself. Android splashscreens doesn't support animations or videos. It only supports bitmaps. However, with clever coding you can get a perceived effect and trigger animations on your "splashscreen". Consider this life-cycle.
   
   1. Android cold start
   2. Static launch screen shown
   3. App loads webview loads
   4. Webview shows the launch screen in full screen.
   5. `navigator.splashscreen.hide()` can hide the android launch screen, to show the webview version of the launch screen. The user at this point sees no difference.
   6. You're free to style/animate/video display anything in your "webview powered" launch screen.
   
   Since the goal of this plugin is to provide an interface to the Android's concept of a launch screen, the explained workaround is out of scope of this plugin. But this plugin offers the necessary APIs for developers to get creative, including being able to disable auto hide and having complete control when to hide the native launch screen. For this reason, I'll be closing this issue.
   
   Should android launch screens offer an animation feature, it could be something we can revisit.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org