Page 2 of 4
Can we Automtically Change the screen size of the app?
Posted: Thu Jan 09, 2014 9:59 am
by Kateryna Grynko
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.
Can we Automtically Change the screen size of the app?
Posted: Thu Jan 09, 2014 11:11 am
by Paul6558915
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?
Can we Automtically Change the screen size of the app?
Posted: Thu Jan 09, 2014 8:24 pm
by Maryna Brodina
Hello! Try to set size in % or vh/vw instead pixel (see http://css-tricks.com/viewport-sized-...)
Can we Automtically Change the screen size of the app?
Posted: Fri Jan 10, 2014 2:21 am
by Paul6558915
Thanks! i'll try this one out.
Can we Automtically Change the screen size of the app?
Posted: Fri Jan 10, 2014 5:02 am
by Paul6558915
Thanks! it worked!
Thanks a lot Maryna, Katya, and Illya!
Can we Automtically Change the screen size of the app?
Posted: Fri Jan 10, 2014 10:04 am
by Paul6558915
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?
Can we Automtically Change the screen size of the app?
Posted: Fri Jan 10, 2014 8:36 pm
by Maryna Brodina
Hello! Could you clarify what squashed means? Some screenshot would help. What device and OS version you use to test?
Can we Automtically Change the screen size of the app?
Posted: Wed Mar 12, 2014 5:50 pm
by Mike6730019
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...
Can we Automtically Change the screen size of the app?
Posted: Wed Mar 12, 2014 5:51 pm
by Mike6730019
I also tried forcing to 100% instead of the vh/vw but didn't fix the issue.
Can we Automtically Change the screen size of the app?
Posted: Wed Mar 12, 2014 9:03 pm
by Nikita
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");