Splash screen (2)
Ability to set a custom image as the application loads.
Submitted by Zef Hemel on 3 March 2011 at 14:41
Issue Log
Do you guys want something to be shown instead of the “Loading…” with the spinner? And should that be an image, or text or?
If possible define the content yourself used as splash or else just an image. I haven’t studied the generated mobl code yet so I don’t know what is beeing loaded at start. Another thought is the possibillity to show custom text to describe what to do if you try to use a browser not supported by mobl.
I think it should be in the configuration file and you should be able to choose one image for iPhone/Android (800x480) and another one for iPad (1024x768) and if there are no images then a text (with this loading spinner) that will be customizable..!
Would definitely like this included. I was actually thinking about this myself. What I did now was include css that applies special styling to the mobl-loading div and hides most of it.
I feel like images would take too long to load in a lot of cases, and thus in my opinion it should be fully configurable. My initial thought was a separate special screen, analog to root(). Like splash() or something.
Alright. The thing is that it will be difficult to use a regular screen for this purpose, because the HTML needs to be inlined in the
.html
file, if a screen first has to be loaded from a.js
file first, the loading screen won’t appear until the application is loaded, which defeats the whole point.What I can do easily is enable to override the default HTML to be generated, e.g. like this:
loadingHTML """ The application is loading. <img src="loading.gif"/> """
In the triple-quote string you can put whatever HTML you like, including Javascript to show a different image based on the used device. The drawback is that it’s fairly low-level, you’re back to regular old HTML coding. But I don’t think there’s a lot of choice there, to use the mobl infrastructure, it needs to be already loaded.
Ok, I implemented it as just described for 0.4.4.
0.4.4 I doesn’t get this working, it thinks the “load” part of “loadingHTML” is the “load” directive
I think I wasn’t entirely clear. You should put the
loadingHTML
thing inconfig.mobl
. Did you try that?
Ah I see, I didn’t :)
Trying to add this doesn’t work:
Log in to post comments