xamarin/Xamarin.Forms

[Bug] Label gets lifted when TailTruncation is applied

オープン

#8,930 opened on 2019/12/17

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
e/3 :clock3:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド