29 Mar 2012 1:46 AM #1
Android keyboard display affects initial viewport sizing
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?
29 Mar 2012 5:23 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
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 Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
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.
29 Mar 2012 1:32 PM #3
Erm ok, force a reflow you say? Can you give me an example of how I would do this please?
24 Jun 2012 9:12 PM #4
Touch has a repaint method:
27 Aug 2012 4:42 AM #5
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?
9 Oct 2012 6:43 AM #6
1 Oct 2014 12:53 PM #7
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
7 Oct 2014 7:08 AM #8
Ext.repaint()Touch has a repaint method:http://docs.sencha.com/touch/2-0/#!/...d-repaintthank you I will follow your way