📌  相关文章
📜  如何在 android 中更改 drawable 的颜色 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:29.293000             🧑  作者: Mango

代码示例4
Drawable unwrappedDrawable = tvContinueShopping.getBackground();
        Drawable wrappedDrawable = DrawableCompat.wrap(unwrappedDrawable);
        DrawableCompat.setTint(wrappedDrawable, (Color.parseColor(getPreferences().getString(Constant.SECOND_COLOR, Constant.SECONDARY_COLOR))));