动态修改颜色
int svgId = com.hihonor.uikit.hniconpublicfile.R.drawable.icsvg_public_note_bold;
int color = ContextCompat.getColor(getContext(), com.hihonor.uikit.hwresources.R.color.magic_color_quaternary);
Resources.Theme theme = getContext().getTheme();
Resources resources = getContext().getResources();
// VectorDrawableCompat vectorDrawableCompat = VectorDrawableCompat.create(getResources(), svgId, theme);
// vectorDrawableCompat.setTint(color);
// ivEmpty.setImageDrawable(vectorDrawableCompat);
HnIconVectorDrawable vectorDrawable = HnIconVectorDrawable.create(resources,svgId,theme);
vectorDrawable.setColorFilter(new PorterDuffColorFilter(color,PorterDuff.Mode.SRC_IN));
ivEmpty.setImageDrawable(vectorDrawable);
// Drawable drawable = ContextCompat.getDrawable(svgId);
// drawable.setTint(color);
// ivEmpty.setImageDrawable(drawable);
// HnIconVectorDrawable vectorDrawable = HnIconVectorDrawable.create(svgId);
// vectorDrawable.setLayerColor(color, 1);
// ivEmpty.setImageDrawable(vectorDrawable);