RecyclerView.Adapter.StateRestorationPolicy

public static final enum RecyclerView.Adapter.StateRestorationPolicy
extends Enum<RecyclerView.Adapter.StateRestorationPolicy>

java.lang.Object
   ↳ java.lang.Enum<androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy>
     ↳ androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy


Defines how this Adapter wants to restore its state after a view reconstruction (e.g. configuration change).

Summary

Enum values

RecyclerView.Adapter.StateRestorationPolicy  ALLOW

Adapter is ready to restore State immediately, RecyclerView will provide the state to the LayoutManager in the next layout pass. 

RecyclerView.Adapter.StateRestorationPolicy  PREVENT

RecyclerView will not restore the state for the Adapter until a call to RecyclerView.Adapter.setStateRestorationPolicy(StateRestorationPolicy) is made with either ALLOW or PREVENT_WHEN_EMPTY

RecyclerView.Adapter.StateRestorationPolicy  PREVENT_WHEN_EMPTY

Adapter is ready to restore State when it has more than 0 items. 

Public methods

static RecyclerView.Adapter.StateRestorationPolicy valueOf(String name)
static final StateRestorationPolicy[] values()

Inherited methods