鸡汤程序员
鸡汤程序员
这个回答。。这个感觉适配一下会好用很多
如果是用原始的adaper,只需要在onBindViewHolder方法里面绑定(bind方法),CheckHelper注册的时候把你的ViewHolder加到泛形即可。
无论用什么Adapter ,第三方也好,自己封装的也好,在你绑定数据的方法内调用bind()方法即可。 比如:原生Adapter ``` public class SimpleAdapter extends RecyclerView.Adapter { CheckHelper mHelper; List list ; public SimpleAdapter(CheckHelper helper,List list){ this.mHelper = helper; this.list = list; } @Override public void onBindViewHolder(@NonNull...
这个功能是挺实用的,后续加上,你也可以先自己添加一个拦截器,大于你规定的check数时将其拦截掉