Answers for "change colored pixels of drawable android"

0

change color of drawable android studio

public static Drawable setTint(Drawable d, int color) {
    Drawable wrappedDrawable = DrawableCompat.wrap(d);
    DrawableCompat.setTint(wrappedDrawable, color);
    return wrappedDrawable;
}
Posted by: Guest on August-22-2021
0

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);
Posted by: Guest on January-21-2021
0

how to change color of drawable in android

Drawable unwrappedDrawable = tvContinueShopping.getBackground();
        Drawable wrappedDrawable = DrawableCompat.wrap(unwrappedDrawable);
        DrawableCompat.setTint(wrappedDrawable, (Color.parseColor(getPreferences().getString(Constant.SECOND_COLOR, Constant.SECONDARY_COLOR))));
Posted by: Guest on January-21-2021

Code answers related to "change colored pixels of drawable android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language