Forum Xamarin Xamarin.Forms

Text wrapping on Android is incorrect

ZoliZoli NLMember ✭✭✭
edited September 22 in Xamarin.Forms

Hi,
Using Labels with longer string - and got incorrect wrapping on Android. On iOS, it's ok. I plan to report to XF guys as bug, but before that let's ask here.
XF 4.5.0.495
Simple XAML:

<StackLayout Margin="0,20,0,0">
    <Label BackgroundColor="Yellow" Text="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaXaaaaaaaaaaa" LineBreakMode="CharacterWrap"/>
    <Label BackgroundColor="Yellow" Text="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaa" LineBreakMode="CharacterWrap"/>
    <Label BackgroundColor="Yellow" Text="[email protected]" LineBreakMode="CharacterWrap"/>
    <Label BackgroundColor="Yellow" Text="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaa" LineBreakMode="NoWrap"/>
</StackLayout>

Result on iOS (correct)

Result on Android (incorrect, see some are wrapped into 3 lines, while obviously 2 lines is enough, just as on iOS)

Specifying <MaxLines=2> will just cut the last line, without changing the wrapping.

Any idea?
Or just should I go and report?

Best Answer

Answers

Sign In or Register to comment.