Bug 55359 - HorizontalTextAlignment="Center" looses alignment when TabbedPage background
Summary: HorizontalTextAlignment="Center" looses alignment when TabbedPage background
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.4
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-04-19 04:05 UTC by Yuka Abuno
Modified: 2017-10-24 07:45 UTC (History)
5 users (show)

Tags: android textalignment tabbedpage label ac
Is this bug a regression?: No
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 55359 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Yuka Abuno 2017-04-19 04:05:13 UTC
Label's HorizontalTextAlignment is not working when Label.Text on TabbedPage not displayed page is updated.

reproduce case : https://github.com/yuka1984/xfandroidHorizontalTextAlignmentBug

Screen : https://github.com/yuka1984/xfandroidHorizontalTextAlignmentBug/blob/master/ezgif-1-f259c9c5b3.gif
Comment 1 Jimmy [MSFT] 2017-04-20 16:01:23 UTC
I am able to reproduce this issue with the project linked to in the description. This appears to only be occurring on Android.

Updating the Label on another child page causes it to lose its HorizontalTextAlignment. However updating that same Label when the page is the current page restore the correct alignment.

### Version Tests
2.3.5-pre1  BAD   BAD   BAD
Comment 2 Yuka Abuno 2017-04-21 03:53:31 UTC
I made additional verification.

It was found that the phenomenon does not occur in the pattern specifying the fixed height using Grid.

      <!-- OK -->
          <RowDefinition Height="30" />
          <RowDefinition Height="30" />
        <Label Grid.Row="0" 
                            TextColor="White" HorizontalTextAlignment="Center"/>
        <Label Grid.Row="1" 
                            TextColor="White" HorizontalTextAlignment="Center"/>
      <!-- Bad -->
          <RowDefinition Height="30" />
          <RowDefinition Height="Auto" />
        <Label Grid.Row="0" 
                            TextColor="White" HorizontalTextAlignment="Center"/>
        <Label Grid.Row="1" 
                            TextColor="White" HorizontalTextAlignment="Center"/>