1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    352
    Vote Rating
    1
    parky128 is on a distinguished road

      0  

    Default Android keyboard display affects initial viewport sizing

    Android keyboard display affects initial viewport sizing


    Hi,

    In my application, when running natively on Android I have a login form panel being display. When first loading up the application and getting the keyboard to display on the screen on one of my input fields, the app only takes up half the screen, the other half being the space reserved for the Android keyboard. When the keyboard hides, the viewport does not resize to the full screen dimensions, so I end up with white space. I can only get around this with a screen orientation change to force the viewport to resize correctly.

    How can I sort this out please?

    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    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


    Android sucks to be honest, why wouldn't they just scroll the page up so the field is in view instead of resizing.

    Anyway, the one time I had this issue I need to force a reflow, I set the height as 99% and then set it to 100% and that worked for me.
    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.

  3. #3
    Sencha User
    Join Date
    Jun 2009
    Posts
    352
    Vote Rating
    1
    parky128 is on a distinguished road

      0  

    Default


    Erm ok, force a reflow you say? Can you give me an example of how I would do this please?

    Thanks

  4. #4
    Sencha - Services Team bt_bruno's Avatar
    Join Date
    Mar 2008
    Location
    Redwood City, CA
    Posts
    145
    Vote Rating
    7
    bt_bruno is on a distinguished road

      0  

    Default Ext.repaint()

    Ext.repaint()


    Touch has a repaint method:

    http://docs.sencha.com/touch/2-0/#!/...method-repaint
    Bruno Tavares, Solutions Engineer
    Sencha, Inc.

  5. #5
    Ext JS Premium Member Steffen Hiller's Avatar
    Join Date
    Mar 2008
    Posts
    753
    Vote Rating
    20
    Steffen Hiller will become famous soon enough

      0  

    Default


    I'm starting to look into this issue right now.
    I have an app that is experiencing this issue very often (on Android 2 and 4).

    Is there already any general workaround / fix for that?
    If so, couldn't that be incorporated into ST's Android Viewport class?

    Thanks

  6. #6