LayoutState

class LayoutState : IncrementalMountExtensionInput, VisibilityExtensionInput, TransitionsExtensionInput, EndToEndTestingExtension.EndToEndTestingExtensionInput, PotentiallyPartialResult, DynamicPropsExtensionInput

The main role of LayoutState is to hold the output of layout calculation. This includes mountable outputs and visibility outputs. A centerpiece of the class is LithoReducer#setSizeAfterMeasureAndCollectResults(ComponentContext, LithoLayoutContext, LayoutState) which prepares the before-mentioned outputs based on the provided LithoNode for later use in MountState.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val animatableRootItem: AnimatableItem?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

the id of the ComponentTree that generated this LayoutState

Link copied to clipboard
val currentLayoutOutputAffinityGroup: OutputUnitsAffinityGroup<AnimatableItem>?
Link copied to clipboard
val currentTransitionId: TransitionId?
Link copied to clipboard
Link copied to clipboard

Whether or not there are components marked as 'ExcludeFromIncrementalMount'.

Link copied to clipboard
val height: Int
Link copied to clipboard
val id: Int

Id of this LayoutState.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val isPartialResult: Boolean = false

Return true if this result calculated from a TreeFuture is partial.

Link copied to clipboard
Link copied to clipboard
val mountableOutputs: List<RenderTreeNode>
Link copied to clipboard

Id of the LayoutState that was compared to when calculating this LayoutState.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var rootHeightAnimation: Transition.RootBoundsTransition?
Link copied to clipboard
var rootLayoutResult: LayoutResult?
Link copied to clipboard
open override val rootName: String
Link copied to clipboard
open override val rootTransitionId: TransitionId?
Link copied to clipboard
var rootWidthAnimation: Transition.RootBoundsTransition?
Link copied to clipboard
val sizeConstraints: SizeConstraints
Link copied to clipboard
open override val testOutputCount: Int
Link copied to clipboard
open override val tracer: Systracer
Link copied to clipboard
open override val transitionIdMapping: Map<TransitionId, OutputUnitsAffinityGroup<AnimatableItem>>

Gets a mapping from transition ids to a group of LayoutOutput.

Link copied to clipboard
open override val transitions: List<Transition>?
Link copied to clipboard
open override val treeId: Int
Link copied to clipboard

Returns the state handler instance currently held by LayoutState.

Link copied to clipboard
open override val visibilityBoundsTransformer: VisibilityBoundsTransformer?
Link copied to clipboard
Link copied to clipboard
open override val visibilityOutputs: List<VisibilityOutput>
Link copied to clipboard
val width: Int

Functions

Link copied to clipboard
fun checkWorkingRangeAndDispatch(position: Int, firstVisibleIndex: Int, lastVisibleIndex: Int, firstFullyVisibleIndex: Int, lastFullyVisibleIndex: Int, stateHandler: WorkingRangeStatusHandler)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Debug-only: return a string representation of this LayoutState and its LayoutOutputs.

Link copied to clipboard
open override fun getAnimatableItem(id: Long): AnimatableItem?
Link copied to clipboard
open override fun getAnimatableItemForTransitionId(transitionId: TransitionId): OutputUnitsAffinityGroup<AnimatableItem>?

Gets a group of LayoutOutput given transition key

Link copied to clipboard
Link copied to clipboard
open override fun getIncrementalMountOutputCount(): Int
Link copied to clipboard
open override fun getIncrementalMountOutputForId(id: Long): IncrementalMountOutput?
Link copied to clipboard
open override fun getIncrementalMountOutputs(): Collection<IncrementalMountOutput>
Link copied to clipboard
open override fun getMountableOutputAt(position: Int): RenderTreeNode
Link copied to clipboard
open override fun getMountableOutputCount(): Int
Link copied to clipboard
open override fun getMountTimeTransitions(previousInput: TransitionsExtensionInput?): List<Transition>?
Link copied to clipboard
open override fun getOutputsOrderedByBottomBounds(): List<IncrementalMountOutput>
Link copied to clipboard
open override fun getOutputsOrderedByTopBounds(): List<IncrementalMountOutput>
Link copied to clipboard
open override fun getPositionForId(id: Long): Int
Link copied to clipboard
fun getRenderTreeNode(output: IncrementalMountOutput): RenderTreeNode
Link copied to clipboard
open override fun getTestOutputAt(position: Int): TestOutput?
Link copied to clipboard
fun getVisibilityOutputAt(index: Int): VisibilityOutput
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun isCompatibleComponentAndSpec(componentId: Int, widthSpec: Int, heightSpec: Int): Boolean
Link copied to clipboard
fun isCompatibleSize(width: Int, height: Int): Boolean
Link copied to clipboard
fun isCompatibleSpec(widthSpec: Int, heightSpec: Int): Boolean
Link copied to clipboard
fun isForComponentId(componentId: Int): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun needsToRerunTransitions(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun setInitialRootBoundsForAnimation(rootWidth: Transition.RootBoundsTransition?, rootHeight: Transition.RootBoundsTransition?)
Link copied to clipboard
open override fun setNeedsToRerunTransitions(needsToRerunTransitions: Boolean)
Link copied to clipboard
fun toRenderTree(): RenderTree