summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2017-06-01 10:27:12 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:24 (GMT)
commit8ef1bfe217513817e68d047f35f885969f660fe2 (patch)
treeda1b61bda934de05c16f5d02184b1cd2ad7b076f /Xamarin.Forms.Platform.Android
parent6539216528571dee0536321e8a4a4d10e6e6610e (diff)
downloadxamarin-forms-8ef1bfe217513817e68d047f35f885969f660fe2.zip
xamarin-forms-8ef1bfe217513817e68d047f35f885969f660fe2.tar.gz
xamarin-forms-8ef1bfe217513817e68d047f35f885969f660fe2.tar.bz2
Fix border on android buttons (#941)
* [Android] Add a button background tracker to handle background and border properties and be shared between button renderers * [Android]Fix border radius dependency * [Android] Make sure we always create or updated the background button tracker
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs1
-rw-r--r--Xamarin.Forms.Platform.Android/FastRenderers/ButtonRenderer.cs1
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/ButtonRenderer.cs2
3 files changed, 3 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
index 394f332..be520e6 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
@@ -27,6 +27,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
public ButtonRenderer()
{
+ System.Diagnostics.Debug.WriteLine("Slow Button!");
AutoPackage = false;
}
diff --git a/Xamarin.Forms.Platform.Android/FastRenderers/ButtonRenderer.cs b/Xamarin.Forms.Platform.Android/FastRenderers/ButtonRenderer.cs
index 898c85d..9a1b3ff 100644
--- a/Xamarin.Forms.Platform.Android/FastRenderers/ButtonRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/FastRenderers/ButtonRenderer.cs
@@ -212,7 +212,6 @@ namespace Xamarin.Forms.Platform.Android.FastRenderers
if (e.NewElement != null)
{
this.EnsureId();
-
UpdateFont();
UpdateText();
UpdateBitmap();
diff --git a/Xamarin.Forms.Platform.Android/Renderers/ButtonRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/ButtonRenderer.cs
index e07a2be..6202a67 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/ButtonRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/ButtonRenderer.cs
@@ -104,6 +104,8 @@ namespace Xamarin.Forms.Platform.Android
_textColorSwitcher = new TextColorSwitcher(button.TextColors);
button.AddOnAttachStateChangeListener(this);
}
+ if (_backgroundTracker == null)
+ _backgroundTracker = new ButtonBackgroundTracker(Element, Control);
}
else
{