package lx.af.adapter;

import android.view.View;

/**
 * author: lx
 * date: 16-1-6
 */
public abstract class AbsViewHolder<T> {

    private View mRoot;

    public AbsViewHolder(View root) {
        mRoot = root;
    }

    public abstract void setData(T data);

    public View getRootView() {
        return mRoot;
    }

    @SuppressWarnings("unchecked")
    public  <E extends View> E obtainView(int id) {
        return (E) mRoot.findViewById(id);
    }
}

@@ -48,41 +48,194 @@
 w;%0A%0A
-/**%0A * author: lx%0A * date: 16-1-6
+import lx.af.utils.ViewInject.ViewInject;%0Aimport lx.af.utils.ViewInject.ViewInjectUtils;%0A%0A/**%0A * author: lx%0A * date: 16-1-6%0A *%0A * view holder base, support view inject %7B@link ViewInject%7D
 %0A */
@@ -358,24 +358,69 @@
 oot = root;%0A
+        ViewInjectUtils.inject(this, mRoot);%0A
     %7D%0A%0A    p

add view inject for AbsViewHolder