Hello,
I’m trying to display two labels on the same row in an *ngFor list. I’ve tried with StackLayout and GridLayout, but I have a problem with both of them.
With StackLayout :
<StackLayout *ngFor="let values of values">
<StackLayout orientation="horizontal">
<label textWrap="true" text="longTextlongTextlongTextlongTextlongTextlongTextlongTextlongTextlongTextlongTextlongText"></label>
<label text="XXX"></label>
</StackLayout>
</StackLayout>
The problem with StackLayout with the ‘XXX’ label is not displayed. (here’s a picture of the rendering)
With GridLayout :
<StackLayout *ngFor="let values of values">
<GridLayout columns="*,80" orientation="horizontal">
<label column="0" textWrap="true" text="longTextlongTextlongTextlongTextlongTextlongTextlongTextlongTextlongTextlongTextlongText"></label>
<label column="1" text="XXX"></label>
</GridLayout>
</StackLayout>
Problem with GridLayout, the ‘XXX’ is displayed, but on top of the other label, despite using different columns (here’s a picture of the rendering)
I’m a bit confused why those two layouts don’t work for that simple task … what am I doing wrong ?