-
23 Aug 2012 4:22 AM #1
Unanswered: adjusting layout as per screen size
Unanswered: adjusting layout as per screen size
Hi,
I am new to sencha touch. I am working on a web app and when I view in a bigger size android phone items in the layout appear fine but when I view it in iPhone layout is not adjusted as per phone size and items go out of the screen .
please suggest how to handle this.
-
26 Aug 2012 5:57 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
- Answers
- 3102
In initComponent, set the layout property based on your criteria.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Aug 2012 5:10 PM #3
Hi,
Sorry but I did not understood what I should do. I tried
but this had no difference. Please advice what should be my criteria . Is it the screen size but then there are so many devices around with different sizes and accordingly what layout property should I set.Code:profiles: { phoneBlackberry: function() { return Ext.is.Blackberry; }, phoneAndroid: function() { return Ext.is.Android; }, phoneApple: function() { return Ext.is.iOS; }, desktop: function() { return Ext.is.Desktop; }, tabletPortrait: function() { return Ext.is.Tablet && Ext.orientation == 'portrait'; }, tabletLandscape: function() { return Ext.is.Tablet && Ext.orientation == 'landscape'; } }
I was expecting with
I should get layout centered irrespective of screen size.Code:layout: { type: 'vbox', align: 'center', pack: 'top', autoScroll: true, },
How to handle this. Please advice.


Reply With Quote