summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2016-10-20 20:00:14 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-10-20 20:00:14 (GMT)
commitd24f3e5438c300242d553e81817b57045f00bf4f (patch)
treeeb081673475ed85977d6f043bad962a0a839c4e1 /Xamarin.Forms.Platform.Android
parent9572c0f7a7f8c49175853432fe7b61b431e450a1 (diff)
downloadxamarin-forms-d24f3e5438c300242d553e81817b57045f00bf4f.zip
xamarin-forms-d24f3e5438c300242d553e81817b57045f00bf4f.tar.gz
xamarin-forms-d24f3e5438c300242d553e81817b57045f00bf4f.tar.bz2
Fix ProgressBar renderer (#439)
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/ProgressBarRenderer.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/ProgressBarRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/ProgressBarRenderer.cs
index 63316a2..18adf7b 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/ProgressBarRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/ProgressBarRenderer.cs
@@ -19,14 +19,16 @@ namespace Xamarin.Forms.Platform.Android
{
base.OnElementChanged(e);
- if (e.OldElement == null)
+ if (e.NewElement != null)
{
- var progressBar = CreateNativeControl();
+ if (Control == null)
+ {
+ var progressBar = CreateNativeControl();
- SetNativeControl(progressBar);
+ SetNativeControl(progressBar);
+ }
+ UpdateProgress();
}
-
- UpdateProgress();
}
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)