androidx.recyclerview.widget.AdapterListUpdateCallback Java Examples

The following examples show how to use androidx.recyclerview.widget.AdapterListUpdateCallback. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AsyncListDifferDelegationAdapter.java    From AdapterDelegates with Apache License 2.0 5 votes vote down vote up
public AsyncListDifferDelegationAdapter(@NonNull AsyncDifferConfig differConfig,
                                        @NonNull AdapterDelegatesManager<List<T>> delegatesManager) {

    if (differConfig == null) {
        throw new NullPointerException("AsyncDifferConfig is null");
    }

    if (delegatesManager == null) {
        throw new NullPointerException("AdapterDelegatesManager is null");
    }

    this.differ = new AsyncListDiffer<T>(new AdapterListUpdateCallback(this), differConfig);
    this.delegatesManager = delegatesManager;
}
 
Example #2
Source File: AsyncListDifferDelegationAdapter.java    From AdapterDelegates with Apache License 2.0 5 votes vote down vote up
/**
 * Adds a list of {@link AdapterDelegate}s
 *
 * @param delegates
 * @since 4.2.0
 */
public AsyncListDifferDelegationAdapter(@NonNull AsyncDifferConfig differConfig,
                                        @NonNull AdapterDelegate<List<T>>... delegates) {

    if (differConfig == null) {
        throw new NullPointerException("AsyncDifferConfig is null");
    }

    this.differ = new AsyncListDiffer<T>(new AdapterListUpdateCallback(this), differConfig);
    this.delegatesManager = new AdapterDelegatesManager<List<T>>(delegates);
}
 
Example #3
Source File: OffsetListUpdateCallback.java    From lttrs-android with Apache License 2.0 4 votes vote down vote up
public OffsetListUpdateCallback(RecyclerView.Adapter<VH> adapter, int offset) {
    this.adapterCallback = new AdapterListUpdateCallback(adapter);
    this.offset = offset;
}
 
Example #4
Source File: DifferFlapAdapter.java    From Flap with Apache License 2.0 4 votes vote down vote up
public DifferFlapAdapter(@NonNull AsyncDifferConfig<T> config) {
    differ = new AsyncListDiffer(new AdapterListUpdateCallback(this), config);
}
 
Example #5
Source File: DiffResult.java    From epoxy with Apache License 2.0 4 votes vote down vote up
public void dispatchTo(Adapter adapter) {
  dispatchTo(new AdapterListUpdateCallback(adapter));
}
 
Example #6
Source File: AssemblyPagedListAdapter.java    From assembly-adapter with Apache License 2.0 4 votes vote down vote up
public AssemblyPagedListAdapter(@NonNull AsyncDifferConfig<T> config) {
    mDiffer = new AsyncPagedListDiffer<T>(new AdapterListUpdateCallback(this), config);
    mDiffer.addPagedListListener(mListener);
}