Skip to content

Commit

Permalink
update BaseBindingAdapter 完善
Browse files Browse the repository at this point in the history
  • Loading branch information
youlookwhat committed Dec 13, 2019
1 parent 5e2f339 commit ef0d432
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public DataAdapter(List<DataItemBean> data) {
}

@Override
protected void bindView(BaseBindingHolder holder, ItemHomeBinding binding, DataItemBean bean, int position) {
protected void bindView(BaseBindingHolder holder, DataItemBean bean, ItemHomeBinding binding, int position) {
binding.tvText.setText(bean.getTitle() + ": " + position);
// holder.setByRecyclerView(getRecyclerView()).addOnClickListener(R.id.tv_text);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public GridAdapter(List<DataItemBean> data) {
}

@Override
protected void bindView(BaseBindingHolder holder, ItemGridBinding binding, DataItemBean bean, int position) {
protected void bindView(BaseBindingHolder holder, DataItemBean bean, ItemGridBinding binding, int position) {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public MainAdapter(List<MainItemBean> data) {
}

@Override
protected void bindView(BaseBindingHolder holder, ItemMainBinding binding, MainItemBean bean, int position) {
protected void bindView(BaseBindingHolder holder, MainItemBean bean, ItemMainBinding binding, int position) {
binding.tvSort.setText(position + 1 + "、 ");
binding.tvText.setText(bean.getTitle());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ private class ViewHolder extends BaseBindingHolder<T, B> {

@Override
protected void onBindingView(BaseBindingHolder holder, T bean, int position) {
bindView(holder, binding, bean, position);
bindView(holder, bean, binding, position);
}
}

protected abstract void bindView(BaseBindingHolder holder, B binding, T bean, int position);
protected abstract void bindView(BaseBindingHolder holder, T bean, B binding, int position);
}

0 comments on commit ef0d432

Please sign in to comment.