Bug 26696 - [Android] Button text alignment changes on Samsung Galaxy S2
Summary: [Android] Button text alignment changes on Samsung Galaxy S2
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.2
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Rui Marinho
: 27677 ()
Depends on:
Reported: 2015-02-03 13:00 UTC by Dominic N [MSFT]
Modified: 2015-07-17 08:27 UTC (History)
7 users (show)

Tags: ac android button devicespecific
Is this bug a regression?: ---
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 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:

Description Dominic N [MSFT] 2015-02-03 13:00:19 UTC
## Overview

On Android, a button initially has the button text centered. Once the button is pressed and he page with the button is returned to, the text-alignment changes to left justified

This looks to be a similar issue as the following bug that has been marked as resolved:

## Steps to reproduce

- Case 1:
1. Download and run app on Galaxy S2
2. Click "log ind" button
3. Click back button
4. Button text is now left-aligned
4. Click button again
5. Button text alignment returns to center-aligned

- Case 2:
1. Download and run app on Galaxy S2
2. Click "log ind" button
3. Click the "Debug" tab
4. Click the searchbar
5. Type a few characters
6. Click back button to return to login screen
7. Observe button text is not left-aligned, but instead correctly

## Expected results

In both cases, alignment of button text remains the same

## Actual results

Alignment of button text changes from center align to left align in Case 1.

## Additional information

This has been tested on Xamarin.Forms 1.3.1 final and on 1.3.3-pre1. The issue remains on pre1. We have only been able to reproduce this issue on a Samsung Galaxy S2.

There is an additional bug in the test project I am attaching that is related to Case 2 above. However, I can not reproduce on my Galaxy S2 running Android 4.1.2. This is the same device and Android version the customer reports using. 

He indicated that the "Xamarin.Forms SearchBar behaves very strangely - Even when its not bound to anything and that it is only ever possible to enter a single character in the input field. Entering any more 'resets' the SearchBar." This should occur in step 5 of Case 2 (but I have been unable to verify).
Comment 3 mgj 2015-02-04 06:19:59 UTC
I have made a video of the SearchBar bug that I experience: https://www.dropbox.com/s/miwnyb1p63e76lc/Xamarin.mp4?dl=0

First the expected behavior is shown on a OnePlus One (to the right), running android 4.4.4.
Then the issue is shown on a Samsung Galaxy S2 (to the left), running android 4.1.2.
Finally it is shown that the Samsung Galaxy S2 behaves as expected when using the Google widgets search.

For the video a ContentPage with a single element, "<SearchBar />" was used.
Comment 4 Jason Smith [MSFT] 2015-03-07 06:14:14 UTC
*** Bug 27677 has been marked as a duplicate of this bug. ***
Comment 5 Jason Smith [MSFT] 2015-07-08 04:07:10 UTC
Should be fixed in 1.4.4-pre1
Comment 6 Parmendra Kumar 2015-07-17 08:27:06 UTC
I have checked Bug 27677 with X.F 1.4.4-pre2 and observed that Button text alignment doesn't changes after clicked.
So I am closing this issue.