Copy link to clipboard
Copied
I have been struggling to get the correct height of the soft. keyboard height on iOS & Android.
There are some topics on the forum but they do not have any answer (Virtual keyboard height or Re: softKeyboardRect.height incorrectly returns 440 on android)
I am getting the height when the keyboard is activated via:
stage.softKeyboardRect.height
On iOS:
Height is returned correctly but on iOS 8, users can have custom keyboards, when such a keyboard is used (like swyft) the height returned is not not correct.
On Android:
Height is always wrong.
There is one ANE (freshplanet/ANE-KeyboardSize · GitHub) but currently works for android only.
Seeing that the height is part of AIR, it should work cross platform.
Any suggestions?
Copy link to clipboard
Copied
Any news about this?
On android (AIR 20) the height is always being reported as 440.
Pan behaviour moves the app slightly up as the value is wrong.
Copy link to clipboard
Copied
hehehe... we'll im sorry to say pal, but it looks like me and you are out of luck.... this is NEVER getting fixed. I'm the one who created that link to bugbase you posted above, and your honestly the very first person to EVER acknowledge it even existed or was a problem. 4 Months gone by with no response from Adobe (though this is actually NOTHING compared to how long some bugs have gone they've never responded to).
you best option (as I've considered it that), is to use the ANE from Fresh Planet for android, and then just hope people don't use a custom keyboard on iOS..... yeah exactly
Copy link to clipboard
Copied
also to hopefully save you a huge hassel, the ANE from Fresh Planet will ONLY give you the correct keyboard height, once the keyboard has completely finished it's mini animation for appearing on the screen... Meaning that you need to set a slight delay, to ensure the keyboard is 100% visible, before running their Keyboard ANE. If you run the keyboard ANE during the keyboards transition to appear, the height reported will be the height of what is visible, not the entire keyboard... Yeah this was fun to discover with mention anywhere on freshplanets website.