Aidan Follestad 9 years ago
parent
commit
74b5f5e21c

+ 4 - 7
core/src/main/java/com/afollestad/materialdialogs/internal/MDTintHelper.java

@@ -7,7 +7,6 @@ import android.graphics.drawable.Drawable;
 import android.os.Build;
 import android.support.annotation.ColorInt;
 import android.support.annotation.NonNull;
-import android.support.graphics.drawable.VectorDrawableCompat;
 import android.support.v4.content.ContextCompat;
 import android.support.v4.graphics.drawable.DrawableCompat;
 import android.support.v7.widget.AppCompatEditText;
@@ -39,9 +38,8 @@ public class MDTintHelper {
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
             radioButton.setButtonTintList(sl);
         } else {
-            Drawable radioVector = VectorDrawableCompat.create(radioButton.getContext().getResources(),
-                    R.drawable.abc_btn_radio_material, null);
-            Drawable d = DrawableCompat.wrap(radioVector);
+            Drawable radioDrawable = ContextCompat.getDrawable(radioButton.getContext(), R.drawable.abc_btn_radio_material);
+            Drawable d = DrawableCompat.wrap(radioDrawable);
             DrawableCompat.setTintList(d, sl);
             radioButton.setButtonDrawable(d);
         }
@@ -132,9 +130,8 @@ public class MDTintHelper {
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
             box.setButtonTintList(sl);
         } else {
-            Drawable checkVector = VectorDrawableCompat.create(box.getContext().getResources(),
-                    R.drawable.abc_btn_check_material, null);
-            Drawable drawable = DrawableCompat.wrap(checkVector);
+            Drawable checkDrawable = ContextCompat.getDrawable(box.getContext(), R.drawable.abc_btn_check_material);
+            Drawable drawable = DrawableCompat.wrap(checkDrawable);
             DrawableCompat.setTintList(drawable, sl);
             box.setButtonDrawable(drawable);
         }

+ 2 - 1
sample/src/main/java/com/afollestad/materialdialogssample/MainActivity.java

@@ -282,7 +282,8 @@ public class MainActivity extends AppCompatActivity implements
                         return true; // allow selection
                     }
                 })
-                .positiveText(R.string.md_choose_label)
+//                .positiveText(R.string.md_choose_label)
+                .alwaysCallSingleChoiceCallback()
                 .show();
     }