📌  相关文章
📜  以编程方式更改可绘制颜色 android - Java 代码示例

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

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