Open EislerDavid opened 5 years ago
Seeing this issue as well. On iOS, tail truncation does not work with spans.
I've also run into incorrect Label height calculations when spans are added (especially if a span is added towards the end of the line). The height of the label will be greater than what it should be (i.e. there is an extra empty line added even though the span text does not end with whitespace).
Hi,
This is a major issue for us, functionally broken by simply updating to the latest Xamarin, something clients do not understand.
Is there any ETA for this?
Hi, this issue is important for us, is there any plan for the fix? thanks
Any update?
This is related with two different errors #8831 and #7534.
When using FormattedText
property on Label
it generates NSAttributedString
and sets to the UILabel.AttributedText
property.
The issue with truncation is caused by the fact that built NSAttributedString
has ParagraphStyle
set which overrides LineBreakMode
to the default word wrap.
I was able to fix that in renderer by regenerating NSAttributedString
and setting LineBreakMode
for the paragraph style in each range.
This is still an active issue.
Description
When I use Label with LineBreakMode="TailTruncation" and set FormattedText with some spans then tail truncation is not working on iOS and freezes on Android.
Steps to Reproduce
Expected Behavior
iOS: Tail truncation on both Labels with FormattedText Android: Tail truncation on both Labels with FormattedText
Actual Behavior
iOS: No truncation Android API23 and higher: Application freezes when page appeared with new lines in text Android API22 and lower: Application freezes when page appeared
Basic Information
Version with issue: 3.6.0.264807
Last known good version: 3.5.0.169047, but I'm not sure if 3.6.0.220655 is working
IDE: Microsoft Visual Studio Community 2017, Version 15.9.6
Platform Target Frameworks:
Android Support Library Version: 28.0.0.1
Nuget Packages: Xamarin.Android.Arch.Core.Common 1.1.1.1 Xamarin.Android.Arch.Core.Runtime 1.1.1.1 Xamarin.Android.Arch.Lifecycle.Common 1.1.1.1 Xamarin.Android.Arch.Lifecycle.LiveData 1.1.1.1 Xamarin.Android.Arch.Lifecycle.LiveData.Core 1.1.1.1 Xamarin.Android.Arch.Lifecycle.Runtime 1.1.1.1 Xamarin.Android.Arch.Lifecycle.ViewModel 1.1.1.1 Xamarin.Android.Support.Animated.Vector.Drawable 28.0.0.1 Xamarin.Android.Support.Annotations 28.0.0.1 Xamarin.Android.Support.AsyncLayoutInflater 28.0.0.1 Xamarin.Android.Support.Collections 28.0.0.1 Xamarin.Android.Support.Compat 28.0.0.1 Xamarin.Android.Support.CoordinaterLayout 28.0.0.1 Xamarin.Android.Support.Core.UI 28.0.0.1 Xamarin.Android.Support.Core.Utils 28.0.0.1 Xamarin.Android.Support.CursorAdapter 28.0.0.1 Xamarin.Android.Support.CustomTabs 28.0.0.1 Xamarin.Android.Support.CustomView 28.0.0.1 Xamarin.Android.Support.Design 28.0.0.1 Xamarin.Android.Support.DocumentFile 28.0.0.1 Xamarin.Android.Support.DrawerLayout 28.0.0.1 Xamarin.Android.Support.Fragment 28.0.0.1 Xamarin.Android.Support.Interpolator 28.0.0.1 Xamarin.Android.Support.Loader 28.0.0.1 Xamarin.Android.Support.LocalBroadcastManager 28.0.0.1 Xamarin.Android.Support.Media.Compat 28.0.0.1 Xamarin.Android.Support.Print 28.0.0.1 Xamarin.Android.Support.SlidingPaneLayout 28.0.0.1 Xamarin.Android.Support.SwipeRefreshLayout 28.0.0.1 Xamarin.Android.Support.Transition 28.0.0.1 Xamarin.Android.Support.v4 28.0.0.1 Xamarin.Android.Support.v7.AppCompat 28.0.0.1 Xamarin.Android.Support.v7.CardView 28.0.0.1 Xamarin.Android.Support.v7.MediaRouter 28.0.0.1 Xamarin.Android.Support.v7.Palette 28.0.0.1 Xamarin.Android.Support.v7.RecyclerView 28.0.0.1 Xamarin.Android.Support.Vector.Drawable 28.0.0.1 Xamarin.Android.Support.VersionedParcelable 28.0.0.1 Xamarin.Android.Support.ViewPager 28.0.0.1 Xamarin.Forms 3.6.0.264807
Reproduction Link
https://github.com/EislerDavid/FormattedTextSamplaProject