Hello everyone !!
I'll get straight to it
I have an app with a lot of "landscape" views and "portrait" views that run on ios and android.
I have had no issues going from landscape to portrait mode , using Stage.setAspectRatio or Stage.setOrientation on either platform - I don't want Air to react to device orientation changes, it must be done in code (typically on user action). I mean, the stage rotates as expected and I get resize events to do my layout again. great !
However introducing text input elements - wrapped StageText - has revealed a "big problem with the software keyboard" I'm really sad to have spotted this late in the project.
On Android the keyboard seems to popup in the "same direction" as the stage. meaning if the stage is landscape right, the keyboard will popup there on the right, it'll be aligned with the stage and the StageText that lives on it. I just have to call stage.setOrientation on a mouse click, and things appear correctly, I mean , a typical use of a landscape app where the keyboard pops up in landscape as well.
On iOS I just can't get this same result, in fact I have two different states on iOS depending on how the application descriptor is setup (for example if I request "portrait" as a starting aspectRatio instead of "any" )
1. either iOS's software keyboard chooses to popup in the device's direction, which is fine if you expect the user to always have the device in the right direction, but I don't want that / the user is not to be trusted 🫢 .
Here's what can happen :
this goes from the iphone SE v2 to the ipad pro 11 .
the bottom bar on ipad is in fact a good visual indicator of what the os thinks the app orientation is / and it doesn't match in that case....
2. or all I get from ios is a keyboard in portrait mode regardless of what I do with the stage. Simple, this is stable but not at all what I expect as I need text input in landscape views.
3. if autoOrients is true, aspectRatio asked is any, then the stage and the keyboard follow my device orientation as expected, but then my portrait and landscape views are not "locked" as I want them to. I want to force the stage orientation AND make iOS think the app is in said orientation as well, I guess.
extra context :
- swf version 44
- willing to use an ANE ...
Have you found a similar issue with iOS ? have you recently managed to handle "manual" orientation changes and the keyboard would be well aligned with your text inputs regardless of the device orientation?
Thank you for any comment, ideas or resources you might have