Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Switch control not respecting Material Design on Android #12150

Closed
Depechie opened this issue Sep 17, 2020 · 2 comments · Fixed by #13166
Closed

[Bug] Switch control not respecting Material Design on Android #12150

Depechie opened this issue Sep 17, 2020 · 2 comments · Fixed by #13166
Assignees
Labels
e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛

Comments

@Depechie
Copy link
Contributor

Description

When using the Switch control in Xamarin Forms, we are able to change the ThumbColor. When setting this to White and also using White for the ContentPage BackgroundColor, you'll notice that the drop shadow of the Switch is gone. According to the Android Material design guidelines, the default Android implementation has this drop shadow.

Reference material from Android with also showing a White example:
https://material.io/develop/android/components/switches
https://material.io/design/interaction/states.html#usage

Steps to Reproduce

  1. Open the https://github.com/xamarin/xamarin-forms-samples/tree/master/UserInterface/SwitchDemos demo
  2. Change the Switch control on the SwitchXamlPage to have a ThumbColor set to White, change the ContentPage BackgroundColor also to White
  3. Run the demo

Expected Behavior

Switch control should have drop shadow and a border around the thumb circle.

Actual Behavior

No border or drop shadow can be seen

Basic Information

  • Version with issue: 4.8

Screenshots

Screenshot 2020-09-17 at 09 23 41

@Depechie Depechie added s/unverified New report that has yet to be verified t/bug 🐛 labels Sep 17, 2020
@samhouts samhouts added this to New in Triage Sep 17, 2020
@Jagan2412
Copy link

Facing same issue

@rmarinho rmarinho removed the s/unverified New report that has yet to be verified label Sep 22, 2020
@rmarinho rmarinho moved this from New to Ready For Work in Triage Sep 22, 2020
@rmarinho rmarinho added the e/3 🕒 3 label Sep 22, 2020
@samhouts samhouts added this to the 5.0.0 milestone Sep 29, 2020
@samhouts samhouts added this to To do in vNext+1 (5.0.0) Oct 1, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@samhouts samhouts removed this from Ready For Work in Triage Nov 3, 2020
@jsuarezruiz jsuarezruiz self-assigned this Dec 16, 2020
@jsuarezruiz jsuarezruiz moved this from To do to In progress in Android Ready For Work Dec 16, 2020
@jsuarezruiz jsuarezruiz added the in-progress This issue has an associated pull request that may resolve it! label Dec 16, 2020
@tossingc
Copy link

tossingc commented Jun 8, 2021

This issue arose when we switched the Android target to 10.0 (API 29) - TargetFrameworkVersion -> v10.0 and targetSdkVersion -> 29.

Prior to making that one change, there was a shadow under the white thumb on a white background.

Screenshot from when we were targeting v9.0 (API 28):
image

Android Ready For Work automation moved this from In progress to Done Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Projects
Development

Successfully merging a pull request may close this issue.

7 participants