-
17 Jul 2012 7:48 AM #1
Answered: Window/items auto resize
Answered: Window/items auto resize
Hi everbody, I have a question. It is possible that all items of my view can change size automatically?
For example, if I see in iPad, everything is fine, it looks good, but, when I see it in a blackberry or iphone, all items are too big for the screen, so it looks bad.
I hope you can understand me, thanks in advance!
-
Best Answer Posted by jerome76
I'm not totally sure about this, but it may have to do with the css being applied depending on the device you are on. Take a look at the debug version of the sench-touch.css, you'll notice these lines around 270
Maybe you can add another class to apply or see which class is being applied and change it accordingly so your items are scaled to the screen size more appropriately.Code:/* line 33, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body { font-size: 104%; } /* line 37, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-ios { -webkit-backface-visibility: hidden; } /* line 41, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-android.x-phone { font-size: 116%; } /* line 45, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-android.x-phone.x-silk { font-size: 130%; } /* line 49, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-ios.x-phone { font-size: 114%; } /* line 53, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-desktop { font-size: 114%; }
-
18 Jul 2012 12:26 PM #2
I'm not totally sure about this, but it may have to do with the css being applied depending on the device you are on. Take a look at the debug version of the sench-touch.css, you'll notice these lines around 270
Maybe you can add another class to apply or see which class is being applied and change it accordingly so your items are scaled to the screen size more appropriately.Code:/* line 33, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body { font-size: 104%; } /* line 37, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-ios { -webkit-backface-visibility: hidden; } /* line 41, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-android.x-phone { font-size: 116%; } /* line 45, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-android.x-phone.x-silk { font-size: 130%; } /* line 49, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-ios.x-phone { font-size: 114%; } /* line 53, ../themes/stylesheets/sencha-touch/default/core/_core.scss */ body.x-desktop { font-size: 114%; }
-
19 Jul 2012 7:50 AM #3
Thanks jerome, checking the css file I was just thinking about you said. Other question, How I can get the device I'm in to use in a listener?
-
19 Jul 2012 7:52 AM #4
-
19 Jul 2012 7:59 AM #5
-
19 Jul 2012 8:02 AM #6
Glad I could help



Reply With Quote