Ability to set a custom image as the application loads.

Submitted by Zef Hemel on 3 March 2011 at 14:41

On 3 March 2011 at 14:45 Zef Hemel tagged configuration

On 3 March 2011 at 15:00 Lipis tagged !lipis

On 4 March 2011 at 23:06 Terje Pedersen tagged !senikk

On 18 March 2011 at 07:53 Zef Hemel commented:

Do you guys want something to be shown instead of the “Loading…” with the spinner? And should that be an image, or text or?


On 18 March 2011 at 08:50 Terje Pedersen commented:

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.


On 18 March 2011 at 08:55 Lipis commented:

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..!


On 6 April 2011 at 21:16 Willem Bult commented:

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.


On 19 April 2011 at 11:47 Zef Hemel commented:

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.


On 19 April 2011 at 12:48 Zef Hemel closed this issue.

On 19 April 2011 at 12:48 Zef Hemel commented:

Ok, I implemented it as just described for 0.4.4.


On 19 April 2011 at 12:48 Zef Hemel tagged 0.4.4

On 6 June 2011 at 08:39 Terje Pedersen commented:

0.4.4 I doesn’t get this working, it thinks the “load” part of “loadingHTML” is the “load” directive


On 6 June 2011 at 09:51 Zef Hemel commented:

I think I wasn’t entirely clear. You should put the loadingHTML thing in config.mobl. Did you try that?


On 6 June 2011 at 09:55 Terje Pedersen commented:

Ah I see, I didn’t :)


On 6 June 2011 at 10:11 Terje Pedersen commented:

Trying to add this doesn’t work:


Log in to post comments