Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Can we Automtically Change the screen size of the app?

Hi Paul,

To set size 320х480 px and this code on Page Show or Resize event:preAppery("Hapsayimage").css("height",480);
Appery("Hapsayimage").css("width",320);/preWhere 'Hapsayimage' is an image component name.

Paul6558915
Posts: 0
Joined: Wed Jan 08, 2014 10:50 am

Can we Automtically Change the screen size of the app?

Hi Katya,

Thanks, It now has changed but my next concern is when i changed back to the 640x960 screen size, the image remained in a 320x480 screen size. How can the sizes be changed automatically without changing the javascript back to
anymore. I mean can't we just run it in any device with the sizes, of images especially, in proportion with the screen size. How can we do that?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Can we Automtically Change the screen size of the app?

Hello! Try to set size in % or vh/vw instead pixel (see http://css-tricks.com/viewport-sized-...)

Paul6558915
Posts: 0
Joined: Wed Jan 08, 2014 10:50 am

Can we Automtically Change the screen size of the app?

Thanks! i'll try this one out.

Paul6558915
Posts: 0
Joined: Wed Jan 08, 2014 10:50 am

Can we Automtically Change the screen size of the app?

Thanks! it worked! :) Thanks a lot Maryna, Katya, and Illya!

Paul6558915
Posts: 0
Joined: Wed Jan 08, 2014 10:50 am

Can we Automtically Change the screen size of the app?

Hi, just one last thing. we tried testing the app in different screen size, it did automatically change the image sizes but it just squashed the images on some devices and on other devices, it was ok.

Is there any way we can try to solve this? or do we just have to understand that there's nothing more we can do and just have to deal with it cause not all devices are proportion to the resolution that you are working on, that it may work on some devices and it may not on others as well?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Can we Automtically Change the screen size of the app?

Hello! Could you clarify what squashed means? Some screenshot would help. What device and OS version you use to test?

Mike6730019
Posts: 0
Joined: Wed Mar 12, 2014 5:50 pm

Can we Automtically Change the screen size of the app?

I'm having trouble with this as well. Tried the options listed here but I must be doing something wrong. I've attached the js code and here is a link to the results. Thanks in advance!

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

Image

Mike6730019
Posts: 0
Joined: Wed Mar 12, 2014 5:50 pm

Can we Automtically Change the screen size of the app?

I also tried forcing to 100% instead of the vh/vw but didn't fix the issue.

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

Can we Automtically Change the screen size of the app?

Hello,

You are setting CSS attributes 100vh and 100vw, but these attributes don't exist. You should use following:
Appery("mobilemain").css("height","100vh");
Appery("mobilemain").css("width","100vw");

Return to “Issues”