dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.86k stars 1.68k forks source link

[Android] Label.CharacterWrap wraps text too soon #22594

Open Pastajello opened 1 month ago

Pastajello commented 1 month ago

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

  1. Create MAUI project
  2. Create Grid with Columns "*,Auto"
  3. Add some layout to Auto column
  4. Add label with long text to * column
  5. 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

github-actions[bot] commented 1 month ago

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:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Pastajello commented 1 month ago

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)

ninachen03 commented 1 month ago

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. image