Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switchcell oncolor #4036

Merged
merged 5 commits into from Nov 27, 2018

Conversation

@manutdkid77
Copy link
Contributor

commented Oct 8, 2018

Description of Change

Added OnColor property for changing color of SwitchCell on Android & iOS

Issues Resolved

API Changes

Added:

  • Color OnColor { get; set; } //Bindable Property
  • UpdateOnColor() //Method to set/update the SwitchCell color

Platforms Affected

  • Core/XAML (all platforms)
  • iOS
  • Android

PR Checklist

  • Has automated tests
  • Rebased on top of the target branch at time of PR
  • Changes adhere to coding standard
@dnfclas

This comment has been minimized.

Copy link

commented Oct 8, 2018

CLA assistant check
All CLA requirements met.

@manutdkid77

This comment has been minimized.

Copy link
Contributor Author

commented Oct 8, 2018

Not able to test the code on iOS as I don't have a Mac, will please need some help with this.

@StephaneDelcroix
Copy link
Member

left a comment

👍 Thanks for this first PR. I like it. Unfortunately, in order to get merged, the support for UWP probably has to be implemented as well.

@@ -12,6 +12,14 @@ public class SwitchCell : Cell

public static readonly BindableProperty TextProperty = BindableProperty.Create("Text", typeof(string), typeof(SwitchCell), default(string));

public static readonly BindableProperty OnColorProperty = BindableProperty.Create("OnColor", typeof(Color), typeof(SwitchCell), Color.Default);

This comment has been minimized.

Copy link
@StephaneDelcroix

StephaneDelcroix Oct 10, 2018

Member

we usually use nameof(OnColor)

This comment has been minimized.

Copy link
@manutdkid77

manutdkid77 Oct 11, 2018

Author Contributor

Sure, I will work on implementing this feature for UWP.

@samhouts samhouts moved this from In Review to In Progress in v3.6.0 Oct 10, 2018

@samhouts samhouts removed the request for review from hartez Oct 15, 2018

@samhouts samhouts assigned StephaneDelcroix and unassigned hartez Oct 15, 2018

@samhouts
Copy link
Member

left a comment

Please also see the comments in #4049

@manutdkid77

This comment has been minimized.

Copy link
Contributor Author

commented Oct 20, 2018

@samhouts have set the default Switch Color to use UISwitch.Appearance.OnTintColor from the Appearance API Commit_Link

Edit: Was able to get hold of a mac and did the following steps

  1. Applied UISwitch.Appearance.OnTintColor = UIColor.Red; in FinishedLaunching method
  2. Debugged the app, & checked that the default color is Red.

Is this correct ?

@PureWeen PureWeen assigned kingces95 and unassigned samhouts Nov 2, 2018

@PureWeen PureWeen requested a review from kingces95 Nov 2, 2018

@kingces95

This comment has been minimized.

Copy link
Member

commented Nov 5, 2018

Awaiting UWP renderer...

@manutdkid77

This comment has been minimized.

Copy link
Contributor Author

commented Nov 6, 2018

@kingces95 sorry for the late update, I wasn't able to do this for uwp. The docs mentioned a

DataTemplate with a Grid containing a TextBlock and ToggleSwitch

I didn't understand how to do this for uwp platform.

@paymicro

This comment has been minimized.

Copy link
Collaborator

commented Nov 16, 2018

UWP support manutdkid77@f63aea1

Handled

@kingces95
Copy link
Member

left a comment

Verified works on all plats.

@samhouts samhouts added the e/6 🕕 label Nov 27, 2018

@rmarinho rmarinho merged commit eee78fe into xamarin:master Nov 27, 2018

8 of 10 checks passed

VSTS: Android API25 Validation Legacy Renderers UITests Finished
Details
VSTS: iOS10 Validation UITests Finished
Details
VSTS: Android API19 Validation Fast Renderers UITests Finished
Details
VSTS: Android API19 Validation Legacy Renderers UITests Finished
Details
VSTS: Android API23 Validation Fast Renderers UITests Finished
Details
VSTS: Android API23 Validation Legacy Renderers UITests Finished
Details
VSTS: Android API25 Validation Fast Renderers UITests Finished
Details
VSTS: iOS11 Validation UITests Finished
Details
Xamarin Forms #PR-4036 - (2233281) succeeded
Details
license/cla All CLA requirements met.
Details

v3.6.0 automation moved this from In Progress to Done Nov 27, 2018

@samhouts samhouts added this to the 4.0.0 milestone Dec 4, 2018

@rookiejava rookiejava referenced this pull request Dec 18, 2018
2 of 3 tasks complete

@samhouts samhouts removed this from Done in v3.6.0 Jan 3, 2019

@samhouts samhouts modified the milestones: 4.0.0, 3.5.0 Jan 10, 2019

@samhouts samhouts added this to Done in v3.5.0 Jan 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.