Using image as form background, for splash screen

31 views
Skip to first unread message

cha...@moondustapp.com

unread,
Jul 3, 2016, 5:50:39 PM7/3/16
to CodenameOne Discussions

I have a form which I would like to use as a splash screen, showing an image.


I added a JPEG as a multi-image, maintaining the default DPIs.


I created a new style in the default theme, with the component name equal to the UIID of the form I'm targeting.


In the "background" tab of the style, I unchecked "Derive", and selected the image in the drop-down.


In the "border" tab of the style, I unchecked "Derive", and selected "empty" border style.


In the "color" tab of the style, I unchecked "Derive" for each of the three options (foreground, background, transparency).


But in the Resource Editor simulator, and the device simulator, the splash screen was totally black.


So I created a container in the form, and gave it the UIID. Now in the Resource Editor, I saw the image in the form preview! But when running, it was still black.


The style preview, at the bottom of the style editing dialog, always showed the top of the image I'm trying to display. But no matter what happens, the simulator (and the app itself) never show this image.


Is there a subtle step that I'm missing?


Thanks!


PS, on this page https://www.codenameone.com/manual/appendix-ios.html your pixel sizes are reversed; they are in the form (y, x) instead of (x, y).

Gareth Murfin

unread,
Jul 3, 2016, 7:05:59 PM7/3/16
to CodenameOne Discussions, cha...@moondustapp.com

try not ticking derive transparency, and make sure transparency is 0

cha...@moondustapp.com

unread,
Jul 3, 2016, 8:42:53 PM7/3/16
to CodenameOne Discussions, cha...@moondustapp.com
 I tried overriding transparency with 0,  and with 255, too.  Didn't help. Thank you!

Bryan Buchanan

unread,
Jul 3, 2016, 8:58:52 PM7/3/16
to CodenameOne Discussions, cha...@moondustapp.com
See attached. Works fine a for me.
Screenshot - 040716 - 10:56:49.png
Screenshot - 040716 - 10:56:49.png

Bryan Buchanan

unread,
Jul 3, 2016, 8:59:53 PM7/3/16
to CodenameOne Discussions, cha...@moondustapp.com

oops - sent same image twice
Screenshot - 040716 - 10:57:05.png

cha...@moondustapp.com

unread,
Jul 3, 2016, 9:47:49 PM7/3/16
to CodenameOne Discussions, cha...@moondustapp.com

My form had its own Enabled checkbox turned off! Checking that, now the background shows.  I knew it was going to be something lame.


Thank you!

Reply all
Reply to author
Forward
0 new messages