Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 7278 [details]
Button before press
On Android, a button in a stack layout with HorizontalOptions = LayoutOptions.Center initially has the button text centered, once the button is pressed the text alignment changes to left justified ( sometimes the button may need to be pressed twice to trigger the problem.
Created attachment 7279 [details]
Button after press
Created attachment 7280 [details]
I have seen something similar in 18.104.22.16840-pre2. I am not sure if it's the same bug.
After a modal page presentation, the button text alignment can change from center to left aligned.
Here is a screencast of the issue: http://screencast.com/t/IXyImCGxzKB
### Steps to Reproduce
1. Download my attached sample project.
2. Press the "Click Me" button.
3. The TestPage is presented as a modal page.
4. Press the hardware back button.
5. Repeat steps 3-4 until the text alignment changes (usually 2 attempts).
### Expected Results
Alignment stays the same.
### Additional Info
Removed the private status of this bug.
Created attachment 7462 [details]
*** Bug 21608 has been marked as a duplicate of this bug. ***
Fixed for next update.
Test Case from bug 21608 (duplicate) is still valid i 1.2.2 pre3 when tested on DEVICE (important)
The release notes for 1.2.2 do mention this bug , but unfortunately, it looks like the issue is not resolved for the test case from comment 4; the test case from bug 21608, comment 0; or the test case from bug 23393, comment 0.
 "[Android] Button text no longer will randomly re-align to the left side of the screen"
## Additional test case
The test case from bug 23393, comment 0 reliably shows the problematic behavior on physical devices and emulators after a single button-tap. The re-alignment happens when the text of either of the Labels (above and below the Button in the StackLayout) is updated by the data binding. Removing the bindings for the Text properties on both Labels stops the problem.
The test case from bug 21608, comment 0 does something similar.
On Windows Phone and iOS, the button text stays centered during all button presses.
## Version information
Xamarin 22.214.171.124 (d5382b8b3a2baf01a2413b145b96b5563d75d4c8)
Xamarin.Android 126.96.36.199 (3ebb5e477e2d3a62f6ba7a0dbc774bdfba2da1c9)
Xamarin.iOS 188.8.131.52 (06491f39c4d42b5fe5b685ef91a843177f5e7247)
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Additional discussion in the comments on the 1.2.3 prerelease 4 release thread:
There's a detailed assessment of the problem in the case of using native Android widgets in a non-Xamarin.Forms app from a user in one of the posts there:
## Possible workaround
Another of the posts on the 1.2.3 prerelease 4 forum thread links to a StackOverflow question that includes a workaround:
Here's a screencast and an additional reproduction to test against
Should be fixed
Still not fixed in 1.3.4, previous renderer workaround doesn't seem to resolve it anymore either.
I quickly checked the test cases from comment 4; bug 21608, comment 0; and bug 23393, comment 0. I built and ran the projects in the Debug configuration, using fast deployment.
All 3 test cases reproduced the problem when using Xamarin.Forms 184.108.40.20657, but *worked correctly* when updated to Xamarin.Forms 220.127.116.1132.
Note that there is one similar known open issue that affects specific devices (including the Samsung Galaxy S2): bug 26696.
If anyone can reproduce the original problem using one of the exact test cases I tried (comment 4; bug 21608, comment 0; or bug 23393, comment 0), and the symptoms you're seeing do not match bug 26696, then be sure to let us know:
- Which test case demonstrates the problem.
- What devices were used for testing.
If the problem can only be reproduced using a _different_ test case, please file a new bug report that includes the new test case (ideally a complete zipped up project that is as simple as possible). See also https://bugzilla.xamarin.com/page.cgi?id=bug-writing.html for additional information to include on the bug report.
## Version info
### Devices tested
- Xamarin Android Player, Nexus 4, Android 4.4.2
- LG Optimus L9 (LGMS769), Android 4.1.2
In addition to Samsung Galaxy S2 devices (bug 26696), it appears that Android 5.0 devices also still demonstrate this problem: bug 27314.
The fixes for each of those problems will be tracked on those separate bug reports.