public class

BridgeAdapterDataObserver

extends RecyclerView.AdapterDataObserver
java.lang.Object
   ↳ android.support.v7.widget.RecyclerView.AdapterDataObserver
     ↳ com.h6ah4i.android.widget.advrecyclerview.adapter.BridgeAdapterDataObserver

Class Overview

This class behaves like a "proxy" which bridges RecyclerView.AdapterDataObserver events to another subscriber object.

Summary

Nested Classes
interface BridgeAdapterDataObserver.Subscriber The subscriber interface. 
Public Constructors
BridgeAdapterDataObserver(BridgeAdapterDataObserver.Subscriber subscriber, Adapter sourceAdapter, Object tag)
Constructor.
Public Methods
Object getTag()
Returns tag object.
void onChanged()
This method dispatches onChanged() event to underlying subscriber.
void onItemRangeChanged(int positionStart, int itemCount, Object payload)
This method dispatches onItemRangeChanged(int, int, Object) event to underlying subscriber.
void onItemRangeChanged(int positionStart, int itemCount)
This method dispatches onItemRangeChanged(int, int) event to underlying subscriber.
void onItemRangeInserted(int positionStart, int itemCount)
This method dispatches onItemRangeInserted(int, int) event to underlying subscriber.
void onItemRangeMoved(int fromPosition, int toPosition, int itemCount)
This method dispatches onItemRangeMoved(int, int, int) event to underlying subscriber.
void onItemRangeRemoved(int positionStart, int itemCount)
This method dispatches onItemRangeRemoved(int, int) event to underlying subscriber.
[Expand]
Inherited Methods
From class android.support.v7.widget.RecyclerView.AdapterDataObserver
From class java.lang.Object

Public Constructors

public BridgeAdapterDataObserver (BridgeAdapterDataObserver.Subscriber subscriber, Adapter sourceAdapter, Object tag)

Constructor.

Parameters
subscriber The subscriber object
sourceAdapter The event source adapter
tag The tag object which users can use in any purpose.

Public Methods

public Object getTag ()

Returns tag object.

Returns
  • The tag object

public void onChanged ()

This method dispatches onChanged() event to underlying subscriber.

public void onItemRangeChanged (int positionStart, int itemCount, Object payload)

This method dispatches onItemRangeChanged(int, int, Object) event to underlying subscriber.

public void onItemRangeChanged (int positionStart, int itemCount)

This method dispatches onItemRangeChanged(int, int) event to underlying subscriber.

public void onItemRangeInserted (int positionStart, int itemCount)

This method dispatches onItemRangeInserted(int, int) event to underlying subscriber.

public void onItemRangeMoved (int fromPosition, int toPosition, int itemCount)

This method dispatches onItemRangeMoved(int, int, int) event to underlying subscriber.

public void onItemRangeRemoved (int positionStart, int itemCount)

This method dispatches onItemRangeRemoved(int, int) event to underlying subscriber.