Get on-screen keyboard height in Adobe AIR Mobile

We are trying to plan an AIR mobile application that will be deployed on both Android and iOS. One of the screens that our design team returned is a full-screen text editor that runs from the top of the screen to the keyboard. Obviously, I cannot do this if I cannot programmatically increase the height of the keyboard. Is there any way to do this?

I know that this is possible in iOS, and it seems impossible in Android. I have no problem creating an ANE, but I would prefer to avoid this if the data is already available in AIR. Alternatively, I could simply assume that the keyboard is 1/2 the size of the screen, and this will work, for the most part, on iOS just fine.

In short, does the height of the on-screen keyboard in AIR become possible?

+8
flex actionscript-3 air
source share
1 answer

I believe that you can access it using the scene class. See this.stage.softKeyboardRect in your view.

Note. I have not tried this personally, but you may need to access it after the softkeyboard event. Add an event listener to the text input on softKeyboardActivate , then call this.stage.softKeyboardRect to get the height and position of the keyboard.

+11
source share

All Articles