We're trying to plan out a mobile AIR application that will deploy to both Android and iOS. One of the screens our design team has returned is a fullscreen text editor that runs from the top of the screen to the keyboard. I obviously cannot do this if I cannot grab the height of the keyboard programatically. Is there a way to do this?
I know that it is possible in iOS and it appears to be impossible in Android. I have no issue creating an ANE to do it, but I would rather avoid it if the data is already available in AIR. Alternatively, I could just assume that the keyboard is 1/2 the size of the screen and this would work, for the most part, on iOS just fine.
In short, is getting the height of the softkeyboard possible in AIR?
I believe you can access it using the stage class. Take a look at this.stage.softKeyboardRect within your view.
Note: I have not tried this personally, but you may need to access it after a softkeyboard event. Add an event listener to your text input on softKeyboardActivate, then call this.stage.softKeyboardRect to get the height and position of the keyboard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With