I am trying to display HTML text inside the Label in my Adobe Air mobile application, so far
I realized that Label doesn't support HTML, I went through the few solutions I found so far on the web:
Instead of Label
- User TextArea
and then use:
StyleableTextField(message.textDisplay).htmlText = messageText;
and in the TextArea
declaration - specify mobile skin
<s:TextArea editable="false" selectable="false" skinClass="spark.skins.mobile.TextAreaSkin" id="message" x="0" y="0" width="100%" height="100%" paddingLeft="5" paddingRight="5" textAlign="left"/>
First of all, HTML still doesn't work, instead of converted HTML it just shows me .....
garbage, but even if it would have worked - TextArea component looks different than Label and doesn't feet in the design I am implementing.
User RichText
component - unfortunately it's not supported in mobile apps
Any other ideas?
Yes, HTML is not supported in the Label
and TextArea
components for Spark (it was supported in Halo, or the mx
components).
The only Flex components that officially do support it are RichText
and RichEditableText
. The skins for these components are not mobile optimized, but they run on mobile just fine. You may run into some speed issues when using massive amounts of it, but you can still use them (as you can with most, if not all, other components that aren't mobile optimized).