calling API not available in all versions (#877)
authorkingces95 <kingces95@users.noreply.github.com>
Wed, 19 Apr 2017 16:50:07 +0000 (12:50 -0400)
committerChris King <kingces95@gmail.com>
Wed, 19 Apr 2017 17:04:02 +0000 (13:04 -0400)
Xamarin.Forms.Platform.Android/FastRenderers/ButtonRenderer.cs

index ae550a6..4881c3b 100644 (file)
@@ -346,7 +346,8 @@ namespace Xamarin.Forms.Platform.Android.FastRenderers
                void Initialize()
                {
                        // Fixes issues with AppCompatButton elevation (z-index) 
-                       StateListAnimator = null;
+                       if (Forms.IsLollipopOrNewer)
+                               StateListAnimator = null;
 
                        SoundEffectsEnabled = false;
                        SetOnClickListener(this);