private void setupEmptyViewObserver(RecyclerView.Adapter paramAdapter) { if (paramAdapter != null) { if (this.mObserver != null) { paramAdapter.unregisterAdapterDataObserver(this.mObserver); this.mObserver = null; } this.mObserver = new RecyclerView.AdapterDataObserver() { public final void onChanged() { PlayRecyclerView.this.updateEmptyStatus(); } }; paramAdapter.registerAdapterDataObserver(this.mObserver); } }
@Override public void associateWith(final DataSetObserver observer) { adObserver = new AdapterDataObserver() { @Override public void onChanged() { observer.onChanged(); } }; recyclerView.getAdapter().registerAdapterDataObserver(adObserver); }
public PlayHeaderListRecyclerViewListener(PlayHeaderListLayout paramPlayHeaderListLayout) { this.mLayout = paramPlayHeaderListLayout; this.mObserver = new RecyclerView.AdapterDataObserver() { public final void onChanged() { PlayHeaderListRecyclerViewListener.access$000$536d8310(PlayHeaderListRecyclerViewListener.this); PlayHeaderListRecyclerViewListener.this.mLayout.mPendingListSync = 2; } public final void onItemRangeChanged$255f295() { onChanged(); } public final void onItemRangeInserted(int paramAnonymousInt1, int paramAnonymousInt2) { onChanged(); } public final void onItemRangeRemoved(int paramAnonymousInt1, int paramAnonymousInt2) { onChanged(); } }; }
Listener(final T recyclerAdapter, final Observer<? super T> observer) { this.recyclerAdapter = recyclerAdapter; this.dataObserver = new AdapterDataObserver() { @Override public void onChanged() { if (!isDisposed()) { observer.onNext(recyclerAdapter); } } }; }