Package 

Class FabricViewStateManager


  • 
    public class FabricViewStateManager
    
                        

    This is a helper base class for ViewGroups that use Fabric State.

    Reason to use this: UpdateState calls from the View layer to the Fabric core can fail, and optionally Fabric will call a "failure callback" if that happens. This class abstracts that and makes it easier ensure that State in Fabric is always up-to-date.

    1. Whenever ViewManager.updateState is called, call View.setStateWrapper. 2. Instead of calling StateWrapper.updateState directly, call View.setState and it will automatically keep retrying the UpdateState call until it succeeds; or you call setState again; or the View layer is updated with a newer StateWrapper.