public class LayoutState extends Object implements IncrementalMountExtension.IncrementalMountExtensionInput, com.facebook.litho.VisibilityOutputsExtension.VisibilityOutputsExtensionInput, TransitionsExtension.TransitionsExtensionInput
LayoutState
is to hold the output of layout calculation. This includes
mountable outputs and visibility outputs. A centerpiece of the class is collectResults(RenderTreeNode, ComponentContext, DebugHierarchy.Node, InternalNode, LayoutState,
DiffNode)
which prepares the before-mentioned outputs based on the provided InternalNode
for later use in MountState
.Modifier and Type | Class and Description |
---|---|
static interface |
LayoutState.CalculateLayoutSource |
Modifier and Type | Method and Description |
---|---|
protected void |
clearCachedLayout(Component component) |
DiffNode |
getDiffTree() |
int |
getLayoutOutputPositionForId(long layoutOutputId) |
InternalNode |
getLayoutRoot() |
RenderTreeNode |
getMountableOutputAt(int index) |
ArrayList<RenderTreeNode> |
getMountableOutputBottoms() |
int |
getMountableOutputCount() |
ArrayList<RenderTreeNode> |
getMountableOutputTops() |
VisibilityModuleInput |
getVisibilityModuleInput() |
List<com.facebook.litho.VisibilityOutput> |
getVisibilityOutputs() |
boolean |
isIncrementalVisibilityEnabled() |
boolean |
needsToRerunTransitions() |
void |
setNeedsToRerunTransitions(boolean needsToRerunTransitions) |
public boolean isIncrementalVisibilityEnabled()
isIncrementalVisibilityEnabled
in interface com.facebook.litho.VisibilityOutputsExtension.VisibilityOutputsExtensionInput
protected void clearCachedLayout(Component component)
public int getMountableOutputCount()
getMountableOutputCount
in interface IncrementalMountExtension.IncrementalMountExtensionInput
getMountableOutputCount
in interface TransitionsExtension.TransitionsExtensionInput
public RenderTreeNode getMountableOutputAt(int index)
getMountableOutputAt
in interface TransitionsExtension.TransitionsExtensionInput
getMountableOutputAt
in interface MountDelegate.MountDelegateInput
public ArrayList<RenderTreeNode> getMountableOutputTops()
getMountableOutputTops
in interface IncrementalMountExtension.IncrementalMountExtensionInput
public ArrayList<RenderTreeNode> getMountableOutputBottoms()
getMountableOutputBottoms
in interface IncrementalMountExtension.IncrementalMountExtensionInput
public List<com.facebook.litho.VisibilityOutput> getVisibilityOutputs()
getVisibilityOutputs
in interface com.facebook.litho.VisibilityOutputsExtension.VisibilityOutputsExtensionInput
public VisibilityModuleInput getVisibilityModuleInput()
getVisibilityModuleInput
in interface com.facebook.litho.VisibilityOutputsExtension.VisibilityOutputsExtensionInput
public DiffNode getDiffTree()
public InternalNode getLayoutRoot()
public int getLayoutOutputPositionForId(long layoutOutputId)
getLayoutOutputPositionForId
in interface IncrementalMountExtension.IncrementalMountExtensionInput
getLayoutOutputPositionForId
in interface MountDelegate.MountDelegateInput
LayoutOutput
with id layoutOutputId in the LayoutState
list of outputs or -1 if no LayoutOutput
with that id exists in the
LayoutState
public boolean needsToRerunTransitions()
needsToRerunTransitions
in interface TransitionsExtension.TransitionsExtensionInput
public void setNeedsToRerunTransitions(boolean needsToRerunTransitions)
setNeedsToRerunTransitions
in interface TransitionsExtension.TransitionsExtensionInput