Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to change color of drawable in android

Drawable unwrappedDrawable = AppCompatResources.getDrawable(context, R.drawable.my_drawable); 
Drawable wrappedDrawable = DrawableCompat.wrap(unwrappedDrawable);
DrawableCompat.setTint(wrappedDrawable, Color.RED);  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #color #drawable #android
ADD COMMENT
Topic
Name
4+6 =