1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    411
    Vote Rating
    2
    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
    Gainesville, FL
    Posts
    37,549
    Vote Rating
    873
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      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
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jun 2009
    Posts
    411
    Vote Rating
    2
    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 User bt_bruno's Avatar
    Join Date
    Mar 2008
    Location
    Redwood City, CA
    Posts
    154
    Vote Rating
    10
    bt_bruno will become famous soon enough

      0  

    Default Ext.repaint()

    Ext.repaint()


    Touch has a repaint method:

    http://docs.sencha.com/touch/2-0/#!/...method-repaint

  5. #5
    Ext JS Premium Member Steffen Hiller's Avatar
    Join Date
    Mar 2008
    Posts
    773
    Vote Rating
    28
    Steffen Hiller will become famous soon enough 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

  7. #7
    Sencha User
    Join Date
    Mar 2014
    Location
    Costa Rica
    Posts
    7
    Vote Rating
    0
    mbrenes12 is on a distinguished road

      0  

    Default hey

    hey


    Hi

    Did someone find some solution for this bug?
    This is happening when I use the device back button to close the softkeyboard

    I am using sencha touch 2.0.2 This bug is happening in Samsung S4 and S5 with Android 4.4.2

    thanks

  8. #8
    Sencha User
    Join Date
    Oct 2014
    Posts
    2
    Vote Rating
    0
    tt1987 is on a distinguished road

      0  

    Default


    Ext.repaint()Touch has a repaint method:http://docs.sencha.com/touch/2-0/#!/...d-repaintthank you I will follow your way