Answers for "setdrawableTint of textview programmatically android"

0

setdrawableTint of textview programmatically android

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));
            }
        }
    }
Posted by: Guest on July-31-2020

Code answers related to "setdrawableTint of textview programmatically android"

Browse Popular Code Answers by Language