public abstract class

RecyclerView.AdapterDataObserver

extends java.lang.Object

 java.lang.Object

↳androidx.recyclerview.widget.RecyclerView.AdapterDataObserver

Overview

Observer base class for watching changes to an RecyclerView.Adapter. See RecyclerView.Adapter.

Summary

Constructors
publicAdapterDataObserver()

Methods
public voidonChanged()

public voidonItemRangeChanged(int positionStart, int itemCount)

public voidonItemRangeChanged(int positionStart, int itemCount, java.lang.Object payload)

public voidonItemRangeInserted(int positionStart, int itemCount)

public voidonItemRangeMoved(int fromPosition, int toPosition, int itemCount)

public voidonItemRangeRemoved(int positionStart, int itemCount)

public voidonStateRestorationPolicyChanged()

Called when the RecyclerView.Adapter.StateRestorationPolicy of the RecyclerView.Adapter changed.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public AdapterDataObserver()

Methods

public void onChanged()

public void onItemRangeChanged(int positionStart, int itemCount)

public void onItemRangeChanged(int positionStart, int itemCount, java.lang.Object payload)

public void onItemRangeInserted(int positionStart, int itemCount)

public void onItemRangeRemoved(int positionStart, int itemCount)

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

public void onStateRestorationPolicyChanged()

Called when the RecyclerView.Adapter.StateRestorationPolicy of the RecyclerView.Adapter changed. When this method is called, the Adapter might be ready to restore its state if it has not already been restored.

See also: RecyclerView.Adapter.getStateRestorationPolicy(), RecyclerView.Adapter