[android] Underline in TextField?


I try to underline a text within a TextField on an Android app. And it doesn’t work.

Here’s the code I use :

	var tft:TextFormat = new TextFormat(null, 40, null, null, null, true);

var txt:TextField = new TextField();
txt.defaultTextFormat = tft;
txt.width = stage.stageWidth - 20;
txt.height = 60;
txt.x = 10;
txt.y = 10;
txt.border = true;
txt.selectable = false;
txt.background = true;

txt.text = "coucou !";

var txt2:TextField = new TextField();
txt2.width = stage.stageWidth - 20;
txt2.height = 60;
txt2.x = 10;
txt2.y = 80;
txt2.border = true;
txt2.background = true;
txt.selectable = false;

txt2.htmlText = "<font size=\"40\"><u>coucou !</u></font>";

And the result in android is :

yep, no underline. :smile:

I verified on the feature Matrix that says it should work : http://www.openfl.org/documentation/technical-overview/feature-matrix/

I also tried my example with windows/flash/neko and it works, here’s the screenshot of the windows app :

The HTML5 seems to have the same issue though.

Did someone have encoutered this bug too ? Is there a workaround ?

note : I use lime 2.0.5/openfl 2.2.3 because the apps generated with the last versions just crash in android.


We recently refreshed the TextField from the NME project (while we continue on the new implementation, like in HTML5)

Both Android and Windows look consistent to me – the TextField was very manual, now it uses drawTiles under the hood, and supports rotation and other features it did not before. However, though it is consistent, I can see that the underline is not connecting between letters :confused:

You mean you have not the same render, under your android, than my screenshot of the android version ?