Repository navigation
SkinPlugin-v1.0.2
增加动态视图换肤绑定器 SkinBinder,用于对动态添加的 View 进行换肤支持
使用示例:
// 方式1:绑定到 View 生命周期(推荐)
SkinBinder.bind(textView)
.bindColor(R.color.text_color, TextView::setTextColor)
.bindDrawable(R.drawable.bg, View::setBackground)
.bind();
// 方式2:绑定到 LifecycleOwner(Activity/Fragment)
SkinBinder.bind(textView)
.bindColor(R.color.text_color, TextView::setTextColor)
.bindTo(lifecycleOwner);