// Path: library/src/main/java/com/steve/creact/library/HolderAPI.java
// public interface HolderAPI {
// 
//   Context getContext();
//   void removeFromCache(@IdRes int id);
//   void removeAll();
//   void initView();
//   <T extends View> T getView(@IdRes int id);
// 
//   void setText(@IdRes int id, CharSequence text);
//   CharSequence getText(@IdRes int id);
// 
//   void setOnItemClickListener(View.OnClickListener listener);
//   void setTextWatcher(@IdRes int id, TextWatcherAdapter watcherAdapter);
//   void setOnClickListener(@IdRes int id, View.OnClickListener onClickListener);
//   void setOnLongClickListener(@IdRes int id, View.OnLongClickListener onLongClickListener);
// 
//   void setVisibility(@IdRes int id, int visibility);
// 
//   void setImageSrc(@IdRes int id, @DrawableRes int res);
//   void setImageBitmap(@IdRes int id, Bitmap bitmap);
//   void setImageDrawable(@IdRes int id, Drawable drawable);
// }
// 
// Path: library/src/main/java/com/steve/creact/library/listener/TextWatcherAdapter.java
// public class TextWatcherAdapter implements TextWatcher {
// 
//   @Override
//   public void beforeTextChanged(CharSequence s, int start, int count, int after) {
// 
//   }
// 
//   @Override
//   public void onTextChanged(CharSequence s, int start, int before, int count) {
// 
//   }
// 
//   @Override
//   public void afterTextChanged(Editable s) {
// 
//   }
// }


import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.support.annotation.DrawableRes;
import android.support.annotation.IdRes;
import android.util.SparseArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.steve.creact.library.HolderAPI;
import com.steve.creact.library.listener.TextWatcherAdapter;
    } catch (ClassCastException e) {
      e.printStackTrace();
      return result;
    }
    //add to cache
    views.put(id, View.class.cast(result));
    return result;
  }

  @Override
  public void setText( @IdRes int id, CharSequence text ) {
    TextView targetTxt = getView(id);
    if (targetTxt != null)
      targetTxt.setText(text);
  }

  @Override
  public CharSequence getText( @IdRes int id ) {
    TextView targetTxt = getView(id);
    if (targetTxt != null)
      return targetTxt.getText();
    return "";
  }

  @Override
  public void setOnItemClickListener( View.OnClickListener listener ) {
    itemView.setOnClickListener(listener);
  }

  @Override
// Path: library/src/main/java/com/steve/creact/library/HolderAPI.java
// public interface HolderAPI {
// 
//   Context getContext();
//   void removeFromCache(@IdRes int id);
//   void removeAll();
//   void initView();
//   <T extends View> T getView(@IdRes int id);
// 
//   void setText(@IdRes int id, CharSequence text);
//   CharSequence getText(@IdRes int id);
// 
//   void setOnItemClickListener(View.OnClickListener listener);
//   void setTextWatcher(@IdRes int id, TextWatcherAdapter watcherAdapter);
//   void setOnClickListener(@IdRes int id, View.OnClickListener onClickListener);
//   void setOnLongClickListener(@IdRes int id, View.OnLongClickListener onLongClickListener);
// 
//   void setVisibility(@IdRes int id, int visibility);
// 
//   void setImageSrc(@IdRes int id, @DrawableRes int res);
//   void setImageBitmap(@IdRes int id, Bitmap bitmap);
//   void setImageDrawable(@IdRes int id, Drawable drawable);
// }
// 
// Path: library/src/main/java/com/steve/creact/library/listener/TextWatcherAdapter.java
// public class TextWatcherAdapter implements TextWatcher {
// 
//   @Override
//   public void beforeTextChanged(CharSequence s, int start, int count, int after) {
// 
//   }
// 
//   @Override
//   public void onTextChanged(CharSequence s, int start, int before, int count) {
// 
//   }
// 
//   @Override
//   public void afterTextChanged(Editable s) {
// 
//   }
// }


// Path: library/src/main/java/com/steve/creact/library/viewholder/HolderHelper.java
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.support.annotation.DrawableRes;
import android.support.annotation.IdRes;
import android.util.SparseArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.steve.creact.library.HolderAPI;
import com.steve.creact.library.listener.TextWatcherAdapter;

    } catch (ClassCastException e) {
      e.printStackTrace();
      return result;
    }
    //add to cache
    views.put(id, View.class.cast(result));
    return result;
  }

  @Override
  public void setText( @IdRes int id, CharSequence text ) {
    TextView targetTxt = getView(id);
    if (targetTxt != null)
      targetTxt.setText(text);
  }

  @Override
  public CharSequence getText( @IdRes int id ) {
    TextView targetTxt = getView(id);
    if (targetTxt != null)
      return targetTxt.getText();
    return "";
  }

  @Override
  public void setOnItemClickListener( View.OnClickListener listener ) {
    itemView.setOnClickListener(listener);
  }

  @Override
  public void setTextWatcher( @IdRes int id, TextWatcherAdapter watcherAdapter ) {