How can soft keyboard pan be measured?
I'm having a challenge measuring the amount of soft keyboard content pan in my mobile Flex AIR app.
I have set the softKeyboardBehavior to pan in my application descriptor. I am able to measure the occurrence of soft keyboard activation, but I can't seem to get an accurate value of how much the content is panned. Depending upon the location of the keyboard focus element, content may be panned to accommodate both the element and the soft keyboard real estate. This works [with bugs, see below], but I need to measure by how much the content was panned so I can present another UI element always onscreen near the top edge of the display. Polling various stage and systemManager values doesn't seem to give me a number I can use.
The workaround I have is to try and guess the amount by polling the height of the soft keyboard rect. Looking at the stage.softKeyboardRect, the height value always the same amount, even if the soft keyboard is actually taking up real estate on screen or not! On an iPad Pro with a smart keyboard attached, often just a stub of a keyboard hint will be overlaid on the screen (about 100 pixels height), but the value returned is a soft keyboard height of 1426 -- obviously wrong. In addition, on the same iPad Pro with smart keyboard attached, often a huge blank white space is revealed on screen to accomodate what AIR mistakenly calculates is needed for a non-visible soft keyboard. Looking in the bugbase I see six other unresolved soft keyboard height bugs, so this may not be the way to go.
Is there a reliable method to measure the amount of pixels the application content was panned when a soft keyboard is activated?
