Malinskiy / SuperRecyclerView

Pumped up RecyclerView
2.63k stars 468 forks source link

Adapter's notifyItemRange* methods do not update layout #27

Open Zeliret opened 9 years ago

Zeliret commented 9 years ago

There is no reaction on notifyItemRangeChanged (for example) method invocation. You have an "update" method but I cant see where it is actually updates main layout.

 private void update() {
  mProgress.setVisibility(View.GONE);
  isLoadingMore = false;
  mPtrLayout.setRefreshing(false);
  if (mRecycler.getAdapter().getItemCount() == 0 && mEmptyId != 0) {
    mEmpty.setVisibility(View.VISIBLE);
  } else if (mEmptyId != 0) {
    mEmpty.setVisibility(View.GONE);
  }
}
Malinskiy commented 9 years ago

Hi @Zeliret!

The layout is updated through the internal adapter/recycler mechanism. The method that you point to is just a hook to update the visibility of SwipeToRefresh and Empty layouts when the underlying changes occur.

When you call notifyItemRangeChanged only the specified range is updated. You can try to debug the adapter and see if you provide the proper updates to views when binding to view happens