Page 1 of 4

Can we Automtically Change the screen size of the app?

Posted: Wed Jan 08, 2014 10:55 am
by Paul6558915

Hi,

Code: Select all

             We’ve registered to your account and we tried to create an app through one screen size specifically at 640x960 because we were thinking that making it at a bigger size would then be easier to resize it to smaller ones. Our concern is that since we are building an app for all types of screen sizes, we tried to test it through the appbuilder test and changed the screen sizes to 480x800, 400x800, 320x480, and 240x320. Somehow, it didn’t change especially the image, it never changed its pixels that would fit in smaller sizes. Even if we change the orientation from portrait to landscape. 

             So what we would like to know, is there a setting wherein that once we created an app, it automatically adjust the size in smaller device? or do we need to create different components for each size in the same project? Or do we have to create another project for another specific size? We’d like to know this now cause we don’t want to like make much effort already and in the end realize that we need to start all over again because the setting or adjustments were supposedly be done in the beginning.

Can we Automtically Change the screen size of the app?

Posted: Wed Jan 08, 2014 11:39 am
by Kateryna Grynko

Hi Paul,

You an change component size using Resize event. Please add this code:preAppery("componentName").css("width", widthValue);
Appery("componentName").css("height", heightValue);/preWhere 'componentName' is a component name,
'widthValue' and 'heightValue' are values you need.


Can we Automtically Change the screen size of the app?

Posted: Thu Jan 09, 2014 2:54 am
by Paul6558915

Hi,

Is the code to be placed in the CSS folder? because i can't open mine.


Can we Automtically Change the screen size of the app?

Posted: Thu Jan 09, 2014 3:02 am
by Illya Stepanov

Hi Paul -- I think Katya had in mind here to place it on event with Action: Run JavaScript.


Can we Automtically Change the screen size of the app?

Posted: Thu Jan 09, 2014 3:19 am
by Paul6558915

hm.. how can i edit the javascript properties? cause i also can't open the javascript folder. I did what you said with the event, then action set to Run javascript. it has a blank property.

i tried adding properties for widthValue and heightValue through the property bar on the right side, then went to events tab, selected Resize; proceeded to setting the action to set property. Somehow I thought this would have been correct if the value fields were set properly. but where? But, i'm no expert with this, it was just a thought, what i did might be wrong. But if it was correct, hopefully I was able to guide a little to what would be the next thing to do. hehe


Can we Automtically Change the screen size of the app?

Posted: Thu Jan 09, 2014 3:26 am
by Paul6558915

I see, Thanks Illya! but what do you mean by component name? the defalut name like "Image" or the common name? Because i tried using the common name, the image didn't change once i tested it. i did vice versa, and still did not change, i set my values to fit in a 320x480 screen size


Can we Automtically Change the screen size of the app?

Posted: Thu Jan 09, 2014 3:41 am
by Paul6558915

This is what i did, Image

and it didn't change Image

The common name is Hapsay_image.


Can we Automtically Change the screen size of the app?

Posted: Thu Jan 09, 2014 4:14 am
by Illya Stepanov

Paul - can you give us the public link? -- I will take a look.


Can we Automtically Change the screen size of the app?

Posted: Thu Jan 09, 2014 4:28 am
by Paul6558915

Can we Automtically Change the screen size of the app?

Posted: Thu Jan 09, 2014 5:42 am
by Paul6558915