private void setTextViewDrawableColor(TextView textView, int color) { for (Drawable drawable : textView.getCompoundDrawables()) { if (drawable != null) { drawable.setColorFilter(new PorterDuffColorFilter(ContextCompat.getColor(textView.getContext(), color), PorterDuff.Mode.SRC_IN)); } } }