Background Behind Default Image

Hello,

Because Android will display images in letterbox, and because Corona uses the @2x image, which is not in the usual 16:9 format there is the ugly black border above and below my image [portrait mode, tested on 480x800 screen] I would like to change the default background color to white, is it possible with Corona?

Thanks,

Krystian

Hi Krystian,

Is this the command you’re looking for?

[lua]display.setDefault( “background”, 255, 255, 255 )[/lua]

If this app is meant for deployment to Kindle, remember that Amazon can be very particular about app content filling the entire screen. You might want to fill the “empty space” with content instead of just white, if the app is for Kindle and it’s “obvious” that you’re not putting content there.

Hope this helps!

Brent

Hello Brent,

no, this is not what I’m looking for.

Default image is loaded and shown before execution gets to main.lua and when putting this to config.lua it crashes simulator immediately.

Thanks,

Krystian

Hi Krystian,

I see now… you mean the “Default.png” image in the project. I misunderstood. On Android, including a launch image isn’t really a “native” feature; it’s something that Corona provides as a convenience to work somewhat similarly to iOS (where the concept came from). As such, it’s not as customizable as if you were using iOS.

Is your app destined for Android only, or cross-platform? I might be able to formulate a workaround to this launch image with white background concept, but at face value, there are limited customize options for the launch image on Android, since it’s not a native feature of the OS.

Regards,

Brent

Hi Brent,

this is a cross platform game.

Since this is Corona controlled, I would suggest an option somewhere in build.settings/config.lua to set the background color of this screen, it would be awesome.

Another option is to allow us to use bigger image and simply let it overflow the screen.

Thanks,

Krystian

Hi Krystian,

Is this the command you’re looking for?

[lua]display.setDefault( “background”, 255, 255, 255 )[/lua]

If this app is meant for deployment to Kindle, remember that Amazon can be very particular about app content filling the entire screen. You might want to fill the “empty space” with content instead of just white, if the app is for Kindle and it’s “obvious” that you’re not putting content there.

Hope this helps!

Brent

Hello Brent,

no, this is not what I’m looking for.

Default image is loaded and shown before execution gets to main.lua and when putting this to config.lua it crashes simulator immediately.

Thanks,

Krystian

Hi Krystian,

I see now… you mean the “Default.png” image in the project. I misunderstood. On Android, including a launch image isn’t really a “native” feature; it’s something that Corona provides as a convenience to work somewhat similarly to iOS (where the concept came from). As such, it’s not as customizable as if you were using iOS.

Is your app destined for Android only, or cross-platform? I might be able to formulate a workaround to this launch image with white background concept, but at face value, there are limited customize options for the launch image on Android, since it’s not a native feature of the OS.

Regards,

Brent

Hi Brent,

this is a cross platform game.

Since this is Corona controlled, I would suggest an option somewhere in build.settings/config.lua to set the background color of this screen, it would be awesome.

Another option is to allow us to use bigger image and simply let it overflow the screen.

Thanks,

Krystian