1. #1
    Sencha User arindam.hit's Avatar
    Join Date
    May 2012
    Location
    Hyderabad
    Posts
    99
    Vote Rating
    1
    Answers
    1
    arindam.hit is on a distinguished road

      0  

    Default Unanswered: How to change the views for different screen resolution??

    Unanswered: How to change the views for different screen resolution??


    Hi,

    I am developing one application using sencha touch 2. In the app, i am using some images as button and some default buttons also. Even some other components are also there. The problem is, when i am testing it for different android devices, the UI is not coming properly. Suppose when i am testing for Samsung S2, it is fitting in the screen. But while testing for 480 * 360 screens, it is going out of the screens. How can i handle the different screen sizes for android?? Is there any sample code??

    Please help..

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,599
    Vote Rating
    434
    Answers
    3102
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    You shouldn't use fixed heights but use flex heights and layouts. If you have padding : 10px try with padding : 5em; or whatever works, em is a flex height depending on line-height and resolution, it's not fixed like px. You can also use percents. Also hbox/vbox layouts, card, fit all will work without fixed heights.
    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.