Removed Privated + changed to _camelCase

This commit is contained in:
Ravinder Jangra 2018-03-14 10:44:55 +05:30
Родитель 2b4a589eed
Коммит 08ce17b4d2
3 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -12,7 +12,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
public class SwitchRenderer : ViewRenderer<Switch, SwitchCompat>, CompoundButton.IOnCheckedChangeListener
{
bool _disposed;
Drawable defaultTrackDrawable;
Drawable _defaultTrackDrawable;
public SwitchRenderer(Context context) : base(context)
{
@ -81,7 +81,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
SwitchCompat aswitch = CreateNativeControl();
aswitch.SetOnCheckedChangeListener(this);
SetNativeControl(aswitch);
defaultTrackDrawable = aswitch.TrackDrawable;
_defaultTrackDrawable = aswitch.TrackDrawable;
}
else
UpdateEnabled(); // Normally set by SetNativeControl, but not when the Control is reused.
@ -98,7 +98,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
UpdateOnColor();
}
private void UpdateOnColor()
void UpdateOnColor()
{
if (Element == null || Control == null)
return;
@ -107,7 +107,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
{
if (Element.OnColor == Color.Default)
{
Control.TrackDrawable = defaultTrackDrawable;
Control.TrackDrawable = _defaultTrackDrawable;
}
else
{

Просмотреть файл

@ -11,7 +11,7 @@ namespace Xamarin.Forms.Platform.Android
{
public class SwitchRenderer : ViewRenderer<Switch, ASwitch>, CompoundButton.IOnCheckedChangeListener
{
Drawable defaultTrackDrawable;
Drawable _defaultTrackDrawable;
public SwitchRenderer(Context context) : base(context)
{
@ -84,7 +84,7 @@ namespace Xamarin.Forms.Platform.Android
e.NewElement.Toggled += HandleToggled;
Control.Checked = e.NewElement.IsToggled;
defaultTrackDrawable = Control.TrackDrawable;
_defaultTrackDrawable = Control.TrackDrawable;
UpdateOnColor();
}
}
@ -97,7 +97,7 @@ namespace Xamarin.Forms.Platform.Android
UpdateOnColor();
}
private void UpdateOnColor()
void UpdateOnColor()
{
if (Element != null)
{
@ -105,7 +105,7 @@ namespace Xamarin.Forms.Platform.Android
{
if (Element.OnColor == Color.Default)
{
Control.TrackDrawable = defaultTrackDrawable;
Control.TrackDrawable = _defaultTrackDrawable;
}
else
{

Просмотреть файл

@ -7,7 +7,7 @@ namespace Xamarin.Forms.Platform.iOS
{
public class SwitchRenderer : ViewRenderer<Switch, UISwitch>
{
UIColor defaultOnColor;
UIColor _defaultOnColor;
protected override void Dispose(bool disposing)
{
if (disposing)
@ -29,7 +29,7 @@ namespace Xamarin.Forms.Platform.iOS
Control.ValueChanged += OnControlValueChanged;
}
defaultOnColor = Control.OnTintColor;
_defaultOnColor = Control.OnTintColor;
Control.On = Element.IsToggled;
e.NewElement.Toggled += OnElementToggled;
UpdateOnColor();
@ -38,12 +38,12 @@ namespace Xamarin.Forms.Platform.iOS
base.OnElementChanged(e);
}
private void UpdateOnColor()
void UpdateOnColor()
{
if (Element != null)
{
if (Element.OnColor == Color.Default)
Control.OnTintColor = defaultOnColor;
Control.OnTintColor = _defaultOnColor;
else
Control.OnTintColor = Element.OnColor.ToUIColor();
}