summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Renderers/TimePickerRenderer.cs
diff options
context:
space:
mode:
authorMarcus Lum <marcusl@gmail.com>2016-08-30 17:37:07 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-08-30 17:37:07 (GMT)
commit61f34d113c9f6941194a6ed3101f54158de722a3 (patch)
treeb6211a4e1a4dba6ec40aad3823a795387e851815 /Xamarin.Forms.Platform.Android/Renderers/TimePickerRenderer.cs
parent5b85aafcd671f5e8745cf52339c20378f91cb748 (diff)
downloadxamarin-forms-61f34d113c9f6941194a6ed3101f54158de722a3.zip
xamarin-forms-61f34d113c9f6941194a6ed3101f54158de722a3.tar.gz
xamarin-forms-61f34d113c9f6941194a6ed3101f54158de722a3.tar.bz2
Allow Custom Android MapRenderers to override the default MapView options (#285)
* Allow Custom Android MapRenderers to override the default MapView options * Larger effort to use CreateNativeControl () everywhere instead of just in the Android AppCompat renderers.
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Renderers/TimePickerRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/TimePickerRenderer.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/TimePickerRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/TimePickerRenderer.cs
index 2b33acc..2bd60a7 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/TimePickerRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/TimePickerRenderer.cs
@@ -34,13 +34,18 @@ namespace Xamarin.Forms.Platform.Android
_dialog = null;
}
+ protected override EditText CreateNativeControl()
+ {
+ return new EditText(Context) { Focusable = false, Clickable = true, Tag = this };
+ }
+
protected override void OnElementChanged(ElementChangedEventArgs<TimePicker> e)
{
base.OnElementChanged(e);
if (e.OldElement == null)
{
- var textField = new EditText(Context) { Focusable = false, Clickable = true, Tag = this };
+ var textField = CreateNativeControl();
textField.SetOnClickListener(TimePickerListener.Instance);
SetNativeControl(textField);