Example #1
0
 public void addDataSourceFront(List<E> dataSource) {
   if (CollectionUtil.isEmpty(dataSource)) {
     return;
   }
   mDataSource.addAll(0, dataSource);
   notifyDataSetChanged();
 }
Example #2
0
  public void setDataSource(List<E> dataSource) {
    mDataSource.clear();

    if (!CollectionUtil.isEmpty(dataSource)) {
      mDataSource.addAll(dataSource);
      notifyDataSetChanged();
    } else {
      notifyDataSetInvalidated();
    }
  }