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

Commit b2d16f6

Browse files
committed
Revert AppCompatButton -> AButton
1 parent 303e01d commit b2d16f6

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

Xamarin.Forms.Material.Android/MaterialButtonRenderer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ void IViewRenderer.MeasureExactly() =>
393393
AView ITabStop.TabStop => this;
394394

395395
// IButtonLayoutRenderer
396-
AButton IButtonLayoutRenderer.View => this;
396+
AppCompatButton IButtonLayoutRenderer.View => this;
397397

398398
Button IButtonLayoutRenderer.Element => this.Element;
399399

Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ event EventHandler<VisualElementChangedEventArgs> IButtonLayoutRenderer.ElementC
220220
remove => ((IVisualElementRenderer)this).ElementChanged -= value;
221221
}
222222

223-
AButton IButtonLayoutRenderer.View => Control;
223+
AppCompatButton IButtonLayoutRenderer.View => Control;
224224
bool IDisposedState.IsDisposed => _isDisposed;
225225
}
226226
}

Xamarin.Forms.Platform.Android/AppCompat/RadioButtonRenderer.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ void IOnCheckedChangeListener.OnCheckedChanged(CompoundButton buttonView, bool i
388388
return _platformElementConfiguration;
389389
}
390390

391-
AButton IButtonLayoutRenderer.View => this;
391+
AppCompatButton IButtonLayoutRenderer.View => null;
392392

393393
Button IButtonLayoutRenderer.Element => this.Element;
394394

395395
}
396-
}
396+
}

Xamarin.Forms.Platform.Android/ButtonLayoutManager.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public ButtonLayoutManager(IButtonLayoutRenderer renderer,
5353
_borderAdjustsPadding = borderAdjustsPadding;
5454
_maintainLegacyMeasurements = maintainLegacyMeasurements;
5555
}
56-
57-
AButton View => _renderer?.View;
56+
57+
AButton View => _renderer?.View ?? _renderer as AButton;
5858

5959
Context Context => _renderer?.View?.Context;
6060

Xamarin.Forms.Platform.Android/FastRenderers/ButtonRenderer.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using Xamarin.Forms.PlatformConfiguration.AndroidSpecific;
1111
using AColor = Android.Graphics.Color;
1212
using AView = Android.Views.View;
13-
using AButton = Android.Widget.Button;
1413

1514
namespace Xamarin.Forms.Platform.Android.FastRenderers
1615
{
@@ -361,7 +360,7 @@ void UpdateCharacterSpacing()
361360
return _platformElementConfiguration;
362361
}
363362

364-
AButton IButtonLayoutRenderer.View => this;
363+
AppCompatButton IButtonLayoutRenderer.View => this;
365364

366365
Button IButtonLayoutRenderer.Element => this.Element;
367366
}
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
using System;
22
using Android.Support.V7.Widget;
3-
using AButton = Android.Widget.Button;
43

54
namespace Xamarin.Forms.Platform.Android
65
{
76
public interface IButtonLayoutRenderer
87
{
9-
AButton View { get; }
8+
AppCompatButton View { get; }
109
Button Element { get; }
1110
event EventHandler<VisualElementChangedEventArgs> ElementChanged;
1211
}
13-
}
12+
}

0 commit comments

Comments
 (0)