This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix removed shadow in Thumb setting a custom color
- Loading branch information
1 parent
64ab1c3
commit 60b82c1
Showing
4 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue12150.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
#if UITEST | ||
using Xamarin.Forms.Core.UITests; | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
#if UITEST | ||
[Category(UITestCategories.Switch)] | ||
#endif | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 12150, "[Bug] Switch control not respecting Material Design on Android", | ||
PlatformAffected.Android)] | ||
public class Issue12150 : TestContentPage | ||
{ | ||
public Issue12150() | ||
{ | ||
} | ||
|
||
protected override void Init() | ||
{ | ||
Title = "Issue 12150"; | ||
|
||
var layout = new StackLayout(); | ||
|
||
var instructions = new Label | ||
{ | ||
Padding = 12, | ||
BackgroundColor = Color.Black, | ||
TextColor = Color.White, | ||
Text = "If each Switch has a shadow on the Thumb, the test has passed." | ||
}; | ||
|
||
var defaultRadioButton = new Switch | ||
{ | ||
HorizontalOptions = LayoutOptions.Center | ||
}; | ||
|
||
var thumbColorRadioButton = new Switch | ||
{ | ||
HorizontalOptions = LayoutOptions.Center, | ||
ThumbColor = Color.White | ||
}; | ||
|
||
var onColorRadioButton = new Switch | ||
{ | ||
HorizontalOptions = LayoutOptions.Center, | ||
OnColor = Color.Red, | ||
ThumbColor = Color.White | ||
}; | ||
|
||
layout.Children.Add(instructions); | ||
layout.Children.Add(defaultRadioButton); | ||
layout.Children.Add(thumbColorRadioButton); | ||
layout.Children.Add(onColorRadioButton); | ||
|
||
Content = layout; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters