summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-10-03 04:05:09 -0700
committerRui Marinho <me@ruimarinho.net>2016-10-04 17:33:58 +0100
commit56707c35f035d21924831161b2deda0325db15f7 (patch)
treefc2d33c539a05545b441e705e6a90130d25707f1
parent00a42778203539a0adf6037ba3f4dcad70c1869a (diff)
downloadxamarin-forms-56707c35f035d21924831161b2deda0325db15f7.tar.gz
xamarin-forms-56707c35f035d21924831161b2deda0325db15f7.tar.bz2
xamarin-forms-56707c35f035d21924831161b2deda0325db15f7.zip
Make CreateNativeControl virtual instead of abstract (#406)
Fixes backwards compatibility issue.
-rw-r--r--Xamarin.Forms.Platform.Android/ViewRenderer.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Android/ViewRenderer.cs b/Xamarin.Forms.Platform.Android/ViewRenderer.cs
index f285d6d9..279056a4 100644
--- a/Xamarin.Forms.Platform.Android/ViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/ViewRenderer.cs
@@ -13,7 +13,10 @@ namespace Xamarin.Forms.Platform.Android
public abstract class ViewRenderer<TView, TNativeView> : VisualElementRenderer<TView>, AView.IOnFocusChangeListener where TView : View where TNativeView : AView
{
- protected abstract TNativeView CreateNativeControl();
+ protected virtual TNativeView CreateNativeControl()
+ {
+ return default(TNativeView);
+ }
ViewGroup _container;
@@ -223,4 +226,4 @@ namespace Xamarin.Forms.Platform.Android
Control.Enabled = Element.IsEnabled;
}
}
-} \ No newline at end of file
+}