Java 类android.support.v7.widget.RecyclerView.AdapterDataObserver 实例源码

项目:FMTech    文件:PlayRecyclerView.java   
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);
  }
}
项目:CutoutViewIndicator    文件:RecyclerStateProxy.java   
@Override
public void associateWith(final DataSetObserver observer) {
    adObserver = new AdapterDataObserver() {
        @Override
        public void onChanged() {
            observer.onChanged();
        }
    };
    recyclerView.getAdapter().registerAdapterDataObserver(adObserver);
}
项目:FMTech    文件:PlayHeaderListRecyclerViewListener.java   
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();
    }
  };
}
项目:RxBinding    文件:RecyclerAdapterDataChangeObservable.java   
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);
      }
    }
  };
}