5 posts / 0 new
Last post
carloparodo
carloparodo's picture
Offline
Joined: 10 Dec 2010
Posts:
Images of IOS.

Hello to everyone. I have a problem on an application for IOS (iphone, ipad): all images are not displayed.
The images are created with objects, "Image" and then enter into objects "Label".
The same application displays the images regularly on Android and Java.
You know help me?
Thank you.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

Hi, I think we need more information. Can you share your code to create this screen?

carloparodo
carloparodo's picture
Offline
Joined: 10 Dec 2010
Posts:

Hi Sam,
This produces a blank screen. Does not run even the background color of the Label (black 0x000000)
Seems that may not display all objects Label...

......
......
int scrWidht = EXTENT_X(screenSize);
int scrHeight = EXTENT_Y(screenSize);
int centerScreenX = scrWidht/2;
int centerScreenY = scrHeight/2;
......
......
MyScreen::MyScreen()
{
myFont = new Font(RES_FONT);

mainLayoutStart = new Layout(0, 0, scrWidht, scrHeight, NULL, 2, 3);
this->setMain(mainLayoutStart);

mainLabel = new Label(0, 0, scrWidht, scrHeight, mainLayoutStart, "", 0x000000, myFont);

Label* labelBis = new Label((scrWidht/2)-65, 20, 137, 55, mainLabel, "Main Page", 0x000000, myFont);
labelBis->setHorizontalAlignment(Label::HA_CENTER);
labelBis->setMultiLine(true);
labelBis->setSelected(true);
labelBis->setPaddingTop(5);

//img background
imgBackground = new Image(centerScreenX-117, centerScreenY-143, 0, 0, mainLabel, true, true, RES_IMAGE);
......
......

}

RES_IMAGE refers to an image .png

many thanks.

carloparodo
carloparodo's picture
Offline
Joined: 10 Dec 2010
Posts:

Hi,
You have some solution?
Have you ever encountered this problem with IOS?
I think it's a major problem ... otherwise, how to put images in the background with IOS?
Many thanks.

Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

Hi,

Widgets can only be contained by Layout widgets. To get around this, you can create a RelativeLayout. Add the image to the RelativeLayout first, and then then add any other widgets to the same RelativeLayout. Have a look at this thread:http://www.mosync.com/content/image-background