Answers for "get drawable from color android"

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 "get drawable from color android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language