BaseRecyclerViewAdapterHelper:
http://www.recyclerview.org/
1. 引入:
build.gradle
~~~
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
~~~
添加依赖:
~~~
dependencies {
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
}
~~~
2. 使用:
~~~
public class HomeAdapter extends BaseQuickAdapter<HomeItem, BaseViewHolder> {
public HomeAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, HomeItem item) {
helper.setText(R.id.text, item.getTitle());
}
}
~~~
3.
4.