Flash StageText "The missing functionalities" (specially important in TextInput)
Flash StageText has a few problems which are specially important when using the TextInput in starling. This could be resolved with an ANE, 1-The positioning, 2-The stageText does't resize when in multiline the text grows, 3- It does't return any measurements of the textSize inside the StageText. 4-It's impossible to skin the clear button (Even just to colorize it would be great!), 5- Resizing the clear button is also difficult
More details about the positioning, point 1: Flash StageText finds difficult the positioning of itself when using Starling. When StageText is implemented as part of a Starling object its coordinates are defined with the nativeStage and not the starling stage. Due to this position it’s necessary to use starling method localToGlobal and unfortunately does not work as expected, forcing to hardcode values for positioning. This solution is not optimal when the application is going to be used in different kind of devices such as iPhones, iPads, android phones or android tablets. In addition, flash stageText does not work in the same way in iOS and android, making it difficult to have the same code for both implementations.
Also missing feature is placeholder text of StageText. One solution is that we are just adding text into StageText when it’s empty, but that is causing problems on Android because system recognize that text as part of StageText and it thinks that is full, other solution is that we can add textfield over StageText and on focusing in or out put visible true/false. But some option as part of StageText like parameter just to add String for placeholder would be really nice.
We are reviewing this idea. Not certain as to the best approach as yet so welcoming comments / suggestions / ideas here.
Why not combine this with https://distriqt.uservoice.com/forums/199650-air-native-extensions/suggestions/4834627-advanced-keyboard-options ?
Dario Kurečki commented
please is there any new update about StageText I put an example on Git so you can check what are main problems. Did you manage to open example project that I provided? Or is there any other way how we can help with this, so we all togeather find best and most efficient solution for StageText.
Dario Kurečki commented
Here you go a small example that is showing a problem with placement. Also please read the readme file in which is everything described in details.
I think this would be really useful. Would it be possible to also get the possibility to customize the softkeyboard through settings on the inputtexfield or simila?
Can you provide an example project demonstrating the positioning issue with StageText that you are having?
We are currently playing around with some native text fields and are considering what options we can provide here. The positioning in starling is probably going to have a similar issue as the native components are detached from the display list / stage 3d.
Gustavo Vilera commented
I think the request for customizable fonts will arise sooner than later...
Personally, device fonts is fine.
What about the 5 main problems described above? You think you can tackle them down guys? :)
Device fonts should be fine, I think. I
What are your thoughts on fonts here? Is it essential to have customisable fonts or are you looking to use the device font?
+1 for this. This would be very helpful and would provide much more flexibility!