Skip to content

Commit

Permalink
feat :添加替换数据方法
Browse files Browse the repository at this point in the history
  • Loading branch information
lyd1874 committed Oct 10, 2018
1 parent fd15b7b commit 909eaf4
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,6 @@ public void setNewData(@Nullable List<T> data) {
notifyDataSetChanged();
}


/**
* insert a item associated with the specified position of adapter
*
Expand Down Expand Up @@ -582,6 +581,15 @@ public void replaceData(@NonNull Collection<? extends T> data) {
notifyDataSetChanged();
}

/**
* 替换数据列表,但是不会触发刷新
*
* @param data
*/
public void replaceData(@Nullable List<T> data) {
mData = data;
}

/**
* compatible getLoadMoreViewCount and getEmptyViewCount may change
*
Expand Down

0 comments on commit 909eaf4

Please sign in to comment.