Browse Source

MDTintHelper uses DialogUtils.setBackgroundCompat where needed for consistency

Aidan Follestad 10 years ago
parent
commit
7ba2ca932e

+ 1 - 6
library/src/main/java/com/afollestad/materialdialogs/internal/MDTintHelper.java

@@ -62,12 +62,7 @@ public class MDTintHelper {
             Drawable drawable = ContextCompat.getDrawable(editText.getContext(), R.drawable.abc_edit_text_material);
             DrawableWrapper d = new DrawableWrapper(drawable);
             d.setTintList(s1);
-            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
-                editText.setBackground(d);
-            } else {
-                //noinspection deprecation
-                editText.setBackgroundDrawable(d);
-            }
+            DialogUtils.setBackgroundCompat(editText, d);
         }
     }