maui
maui copied to clipboard
[Android] Label.CharacterWrap wraps text too soon
Description
Hello,
There is an issue with Character wrapping in Android, its somehow splitting the text into sameish length lines:
On iOS its working fine:
Steps to Reproduce
- Create MAUI project
- Create Grid with Columns "*,Auto"
- Add some layout to Auto column
- Add label with long text to * column
- Set LineBreakMode to "CharacterWrap"
Link to public reproduction project repository
https://github.com/Pastajello/LabelCharacterWrapIssue
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
No response
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- [Android and iOS] Label text not wrapping inside AbsoluteLayout (#18930), similarity score: 0.85
- 8.0.21 update breaks android label wrap feature which causes other controls exceeding layout borders (#22083), similarity score: 0.82
Closed similar issues:
- WordWrap doesn't wrap on a Label in a Grid if the ColumnDefinition is set to Auto. (#21110), similarity score: 0.82
- Android: LineBreakMode="WordWrap" not working when label in popup on a row in a multi-row grid - 8.0.7-nightly.9897 (#20092), similarity score: 0.81
- Label does not get wrapped when in Grid with ColumnSpan (#11863), similarity score: 0.81
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
From my tests it has been like that from at least 8.0.7. Couldn't compile on 8.0.6 (something about SplashTheme not existing)
Verified this issue with Visual Studio 17.11.0 Preview 1.0 ( 8.0.40 & 8.0.21& 8.0.3 ) Can repro it. Xamarin form cannot repro it.
If the Label's text is Chinese, there is another issue.
Expected correct behavior, correct line breaks, and the first character of each line is not a punctuation mark:
你好,世
界。
But, Actual behavior,No line breaks and missing characters:
你好,世