1、brvah自带demo代码
2、修改AnimationAdapter,使用butterknife生成viewholder
AnimationAdapter extends BaseQuickAdapter<Status, AnimationAdapter.ViewHolder>
helper.img.setImageResource(R.mipmap.animation_img1);
`static class ViewHolder extends BaseViewHolder {
@BindView(R.id.img)
ImageView img;
@BindView(R.id.tweetName)
TextView tweetName;
@BindView(R.id.tweetText)
TextView tweetText;
@BindView(R.id.tweetDate)
TextView tweetDate;
@BindView(R.id.card_view)
CardView cardView;
ViewHolder(View view) {
super(view);
ButterKnife.bind(this, view);
}
}`
3、运行报错
java.lang.ClassCastException: com.chad.library.adapter.base.BaseViewHolder cannot be cast to com.chad.baserecyclerviewadapterhelper.adapter.AnimationAdapter$ViewHolder at com.chad.baserecyclerviewadapterhelper.adapter.AnimationAdapter.convert(AnimationAdapter.java:31)