Package 

Enum RecyclerView.Adapter.StateRestorationPolicy

  • All Implemented Interfaces:
    java.io.Serializable , java.lang.Comparable

    
    public enum RecyclerView.Adapter.StateRestorationPolicy
    
                        

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

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALLOW

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

      PREVENT_WHEN_EMPTY

      Adapter is ready to restore State when it has more than 0 items. RecyclerView willprovide the state to the LayoutManager as soon as the Adapter has 1 or more items.

      PREVENT

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