Page 1 of 1

My App does not scale with different resolutions

Posted: Thu Aug 21, 2014 4:39 am
by Hawk

I have created a carousel contains 5 frames/images. In the default screen, i sat the images to be in the middle. When I test in the browser, every thing looks fine with 320/480 resolution. However, when I go to higher (e.g. 400X800, 640X960) the frames/images sticks to the left side and do not stretch out to cover the space that they use to cover with the original resolution.

Image

Image

Image


My App does not scale with different resolutions

Posted: Thu Aug 21, 2014 5:48 am
by Kateryna Grynko

Hi Hawk,

Please click Refresh button (top left) when you choose a new frame size.


My App does not scale with different resolutions

Posted: Thu Aug 21, 2014 6:09 am
by Hawk

I have tried that but unfortunately it did not work. I noticed some componenets scale pretty good and others not. I think those which I defined there position manually do not scale, while components which I left them in the default position scale. I usually update the componenet position by update "margin" values from the panel on left. Is that the right method?

http://appery.io/app/mobile-frame?src...


My App does not scale with different resolutions

Posted: Thu Aug 21, 2014 8:00 am
by Kateryna Grynko

Hawk,

Please add custom CSS file with the following code to center images inside of carousel:pre[name=mobilecarousel_8] .ui-carousel-box img {
margin-left: auto;
margin-right: auto;
}/preWhere mobilecarousel_8 is a carousel name.


My App does not scale with different resolutions

Posted: Thu Aug 21, 2014 8:42 am
by Hawk

Thanks Katya, it works for the position. What about the size, The components do not scale to get bigger when I use bigger screen and smaller when I use smaller screen?


My App does not scale with different resolutions

Posted: Thu Aug 21, 2014 10:56 am
by Kateryna Grynko

Hi Hawk,

Please set size in relative units rather than pixels: %, vh/vw


My App does not scale with different resolutions

Posted: Fri Aug 22, 2014 2:29 am
by Hawk

May I know how can I do that?


My App does not scale with different resolutions

Posted: Fri Aug 22, 2014 2:57 am
by Yurii Orishchuk

Hi Hawk,

You can do it with following code instead of yours:

pre

[name="mobilecarousel_8"] .ui-carousel-box img {
margin-left: auto;
margin-right: auto;
width: 70%;
}

/pre

Regards.