package cn.feng.skin.manager.entity;

import android.view.View;
import android.widget.ImageView;

import cn.feng.skin.manager.loader.SkinManager;
import cn.feng.skin.manager.util.L;

/**
 * Created by Jason on 2018/9/16.
 */

public class SrcAttr extends SkinAttr {
    @Override
    public void apply(View view) {
        if(view instanceof ImageView){
            ImageView iv = (ImageView)view;
            if(RES_TYPE_NAME_DRAWABLE.equals(attrValueTypeName)){
                L.e("attr1", "SrcAttr");
                iv.setImageDrawable(SkinManager.getInstance().getDrawable(attrValueRefId));
            }
        }
    }
}
