xamarin/Xamarin.Forms

[Bug] Label gets lifted when TailTruncation is applied

Ouverte

#8 930 ouverte le 17 déc. 2019

 (1 commentaire) (0 réaction) (0 personne assignée)C# (1 926 forks)batch import
e/3 :clock3:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Métriques du dépôt

Stars
 (5 644 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Description

Label gets lifted when TailTruncation is applied

Steps to Reproduce

I've used the following code to reproduce the issue:

<Grid>
	<Grid.RowDefinitions>
		<RowDefinition Height="*" />
		<RowDefinition Height="*" />
		<RowDefinition Height="*" />
	</Grid.RowDefinitions>
	
	<FlexLayout Grid.Row="0" JustifyContent="SpaceBetween">
		<Label FlexLayout.Shrink="0" Text="Title:" />
		<Label LineBreakMode="TailTruncation" Text="Label Label Label Label Label Label Label Label Label" />
	</FlexLayout>
	<FlexLayout Grid.Row="1" JustifyContent="SpaceBetween">
		<Label FlexLayout.Shrink="0" Text="Title:" />
		<Label LineBreakMode="MiddleTruncation" Text="Label Label Label Label Label Label Label Label Label" />
	</FlexLayout>
	<FlexLayout Grid.Row="2" JustifyContent="SpaceBetween">
		<Label FlexLayout.Shrink="0" Text="Title:" />
		<Label LineBreakMode="HeadTruncation" Text="Label Label Label Label Label Label Label Label Label" />
	</FlexLayout>
</Grid>

Expected Behavior

In my case, I expect the Label to not get lifted and remain on the same level as "Title:" as in rows where HeadTruncation and MiddleTruncation is used instead of TailTruncation

Actual Behavior

After applying TailTruncation, labels gets lifted

Basic Information

  • Version with issue: 4.4.0.991265
  • IDE: Visual Studio 2019 16.4.1
  • Platform Target Frameworks:
    • Android: API 23

Screenshots

Notice how the TailTruncated "Label Label Label..." is sligtly lifted in the first row after "Title:" when comparing it to the other two rows which use MiddleTruncation and HeadTrunctation

image

Guide contributeur