Bug 48236 - BackgroundColor for Stepper behaves differently on iOS to Android and UWP
Summary: BackgroundColor for Stepper behaves differently on iOS to Android and UWP
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.3.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-11-28 20:01 UTC by John Hardman
Modified: 2017-01-03 11:36 UTC (History)
5 users (show)

Tags: Stepper BackgroundColor UWP Android ac
Is this bug a regression?: ---
Last known good build:


Attachments
Zip file containing screenshots from Android, iOS and UWP phones (261.81 KB, application/zip)
2016-11-28 20:01 UTC, John Hardman
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 John Hardman 2016-11-28 20:01:52 UTC
Created attachment 18699 [details]
Zip file containing screenshots from Android, iOS and UWP phones

The attached zip file contains three screenshots generated using the same code.

The bottom item on each screenshot is a Stepper, generated using the following code:

            Stepper stepper = new Stepper
            {
            };
            stepper.Increment = 1;
            stepper.Minimum = 0;
            stepper.Maximum = 28;
            stepper.Value = 1;
            stepper.BackgroundColor = Color.Pink;


On Android, the BackgroundColor is used for (what from the user's point of view is) the area on which the "-" and "+" buttons sit, with the buttons not using the BackgroundColor (having a silver/gray instead on my phone).

On UWP, the buttons AND the area on which they sit all have pink backgrounds (i.e. the BackgroundColor), which is clearly wrong.

On iOS, the buttons are pink (using the BackgroundColor) and the area on which they sit is presumably transparent, showing the color of the underlying layout.

Which is correct? Probably iOS, although possibly Android, but definitely not UWP which is clearly wrong.

Clearly, as a separate enhancement, one or two more Color properties need to be added (one if iOS is deemed to be correct, two if Android is deemed to be correct), but that is for after the fixing of BackgroundColor, which is just plain wrong.
Comment 1 adrianknight89 2016-11-29 01:34:47 UTC
This sounds like a breaking change.

I think iOS UIStepper has two buttons and the +/- signs are actually button images, so if you wanted to style the border color, you'd need to supply new background images. When you set the stepper to pink, you're updating the background color of the stepper and not touching its buttons. So, that's what's happening on iOS.

Android seems to be a linear layout with two child buttons as well. It's also updating the background color of the parent view and not touching the buttons.

Sounds like UWP is wrong.

It'd be nice to screenshot iOS and Android steppers in Xamarin native for comparison. How do they behave when their background color is changed?
Comment 2 Rui Marinho 2017-01-03 11:36:46 UTC
Should be fixed in 2.3.4-pre2