how to change the color of a drawable programmically

https:/‮ual.www/‬tturi.com
how to change the color of a drawable programmically
Drawable unwrappedDrawable = AppCompatResources.getDrawable(context, R.drawable.my_drawable); 
Drawable wrappedDrawable = DrawableCompat.wrap(unwrappedDrawable);

DrawableCompat.setTint(wrappedDrawable, Color.BLUE);
Created Time:2017-09-09 22:50:39  Author:lautturi