LayoutState

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
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
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
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
var rootLayoutResult: LayoutResult?
Link copied to clipboard
val sizeConstraints: SizeConstraints
Link copied to clipboard
open override val testOutputCount: Int
Link copied to clipboard

Returns the state handler instance currently held by LayoutState.

Link copied to clipboard
open override val viewAttributes: Map<Long, ViewAttributes>
Link copied to clipboard
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

Gets a group of LayoutOutput given transition key

Link copied to clipboard
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(): 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 getRootName(): String
Link copied to clipboard
open override fun getRootTransitionId(): TransitionId?
Link copied to clipboard
open override fun getTestOutputAt(position: Int): TestOutput?
Link copied to clipboard
open override fun getTracer(): Systracer
Link copied to clipboard

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

Link copied to clipboard
open override fun getTransitions(): List<Transition>?
Link copied to clipboard
open override fun getTreeId(): Int
Link copied to clipboard
open override fun getVisibilityBoundsTransformer(): VisibilityBoundsTransformer?
Link copied to clipboard
fun getVisibilityOutputAt(index: Int): VisibilityOutput
Link copied to clipboard
open override fun getVisibilityOutputs(): List<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
open override fun isIncrementalMountEnabled(): 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 setNeedsToRerunTransitions(needsToRerunTransitions: Boolean)
Link copied to clipboard
fun toRenderTree(): RenderTree