Quantcast
Channel: Adobe Community : All Content - AIR Development
Viewing all articles
Browse latest Browse all 2954

TextFlow: How can I reduce the gap between ListItemElements in Adobe Air Mobile 19

$
0
0

Hi,

 

I've got a textFlow imported with TextConverter.importToFlow(htmlValue, TextConverter.TEXT_FIELD_HTML_FORMAT);

The gap between the ListItemElements produced with <ul><li>Item1</li><li>Item2</li></ul> is too big. I've tried many things to reduce the gap height, with no luck.

 

What I've tried:

 

      var arr:Array = label1.textFlow.getElementsByTypeName("li");

 

for each(var listElement:ListItemElement in arr){

                    var pArr:Array = listElement.getTextFlow().getElementsByTypeName("p");

                    for each(var p:ParagraphElement in pArr){

                        TextLayoutFormat(p.format).paddingBottom = -100;

                        TextLayoutFormat(p.format).paddingTop = -100;

                        TextLayoutFormat(p.format).listAutoPadding = 0;

                        TextLayoutFormat(p.format).lineHeight = "100%";

 

 

 

 

                        var spanArr:Array = listElement.getTextFlow().getElementsByTypeName("span");

                        for each(var span:SpanElement in spanArr){

                            TextLayoutFormat(span.format).paddingBottom = -100;

                            TextLayoutFormat(span.format).paddingTop = -100;

                            TextLayoutFormat(span.format).listAutoPadding = 0;

                            TextLayoutFormat(span.format).lineHeight = "100%";

                        }

                    }

                    TextLayoutFormat(listElement.format).lineHeight = "105%";

                    TextLayoutFormat(listElement.format).paddingBottom = -200;

                    TextLayoutFormat(listElement.format).paddingTop = -200;

                }

 

The only effect is that the lineHeight inside the ListItemElement is rededuced which is not the expected behavior.

 

Do you have any ideas??

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 2954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>