Bug 31128 - Label with word wrapping causes layout error in StackLayout.
Summary: Label with word wrapping causes layout error in StackLayout.
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.2
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Jason Smith [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-06-15 15:38 UTC by Jon Goldberger [MSFT]
Modified: 2016-04-10 00:34 UTC (History)
6 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:


Attachments
Test Project (181.67 KB, application/zip)
2015-06-15 15:38 UTC, Jon Goldberger [MSFT]
Details
Screenshots (107.12 KB, application/zip)
2015-06-15 15:39 UTC, Jon Goldberger [MSFT]
Details


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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Jon Goldberger [MSFT] 2015-06-15 15:38:54 UTC
Created attachment 11610 [details]
Test Project

## Description

With two labels on a Horizontal StackLayout, the second one being set to right align with options:
HorizontalOptions="EndAndExpand" 
XAlign="End"
if the first label has long words that word wrap, the second label is no longer right aligned on iOS. On Android, the second label stays right aligned but the short text (three characters) is split to two lines.  


## Steps to reproduce

1. Open the attached test project and restore packages.

2. Set the iOS project as the startup project and launch to sim/device. 

Expected result: The label on the right with text "85d" will be right aligned.

Actual result: The label is not right aligned. See attached screenshot "iOS Layout Error.jpg"

3. Set the Android project as the startup project and launch to sim.device

Expected result: The label on the right will be right aligned and the text will be on one line.

Actual result: Though the label is right aligned, the three character text is split to two lines. See attached screenshot "Android Layout error.jpg"

## Note

Changing the text for the first label to a short string that will not wrap resolves this layout error. See attached screenshots" iOS Layout Correct.jpg" and "Android Layout correct.jpg"


## Environment

=== Xamarin Studio ===

Version 5.9.3 (build 1)
Installation UUID: 2dc9022f-f9a8-424f-8284-bf224cbbfde0
Runtime:
	Mono 4.0.1 ((detached/ed1d3ec)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010044

=== Xamarin.Android ===

Version: 5.1.3.1 (Business Edition)
Android SDK: /Users/apple/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.3.2 (7718)
Build 6D2105

=== Xamarin.iOS ===

Version: 8.10.1.64 (Business Edition)
Hash: e6ebd18
Branch: master
Build date: 2015-05-21 21:55:09-0400

=== Xamarin.Mac ===

Version: 2.0.1.64 (Business Edition)

=== Build Information ===

Release ID: 509030001
Git revision: 5a524e1726ed103fdd4fe37e0356f2b35466ce9d
Build date: 2015-06-02 16:35:08-04
Xamarin addins: 51957cfbd06be911b212671ad05c2c6221ac90f9

=== Operating System ===

Mac OS X 10.10.3
Darwin Jons-iMac.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 1 Jon Goldberger [MSFT] 2015-06-15 15:39:20 UTC
Created attachment 11611 [details]
Screenshots
Comment 2 Jason Smith [MSFT] 2016-04-10 00:34:06 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
 
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team