Alex Rivera | Logout

Animated splash screen with Phonegap

Asked 2011-09-20T07:42:31.847
11

Is that possible to add animated splash screens for Android and iOS Phonegap apps? I tried to add animated .gif as splash screen file for Android but it doesn't work. I.e. there is no animation, the only thing I can see is first frame of the .gif.

And also is there a way to add dynamic text somewhere at splash screen? Actually this is what I want. And to use .gif is just my assumption how can I do it in the easiest way. So, if you can give me example of working cod for iOS and Android dynamic splash screens with Phonegap it will be even better.

Edit
Report

1 Answer

5

gif animations are not supported on Android. Animations are possible using jQuery. This is what you can do

  1. Create a data-role="page" div which contains your splash screen view
  2. register a event listener for "pageshow" event for this page and start your animation using jQuery
  3. In the same eventlistener call javascript's timeout function

setTimeout('functionToLoadNewPage', 2000); //functionToLoadNewPage - function name which will load a new page using $.mobile.changePage and 2000 - number of milliseconds for splash screen to be visible

answered 2011-09-20T08:01:18.817

Your Answer