NestedTreeHolder

class NestedTreeHolder @JvmOverloads constructor(propContainer: TreePropContainer? = null, val cachedNode: LithoNode? = null, var parentContext: ComponentContext? = null) : LithoNode

This class is a placeholder for the unresolved layout and result of a Components which implement the com.facebook.litho.annotations.OnCreateLayoutWithSizeSpec.The TreePropContainer, padding and border width properties and held separately so that they can be copied into the actual nested tree layout before measuring it.

Constructors

Link copied to clipboard
constructor(propContainer: TreePropContainer? = null, cachedNode: LithoNode? = null, parentContext: ComponentContext? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val cachedNode: LithoNode? = null

When a node is measured during Component.measure and a layout-result is cached, it is cached using that node as the key. Later, this layout may resolve a nested-tree-holder node, and so in order to be able to access this cache, this node is used.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var customBindersForMountSpec: MutableMap<Class<*>, RenderUnit.DelegateBinder<Any, Any, Any>>?
Link copied to clipboard
var customViewBindersForMountSpec: MutableMap<Class<*>, RenderUnit.DelegateBinder<Any, Any, Any>>?

Returns a nullable map of RenderUnit.DelegateBinder that is aimed to be used to set the optional mount binders right after creating a MountSpecLithoRenderUnit.

Link copied to clipboard
Link copied to clipboard
var focusedHandler: EventHandler<FocusedVisibleEvent>?
Link copied to clipboard
Link copied to clipboard
var fullImpressionHandler: EventHandler<FullImpressionVisibleEvent>?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var invisibleHandler: EventHandler<InvisibleEvent>?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var primitive: Primitive?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A unique identifier which may be set for retrieving a component and its bounds when testing.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val transitionId: TransitionId?
Link copied to clipboard
Link copied to clipboard
var transitionKeyType: Transition.TransitionKeyType?
Link copied to clipboard
Link copied to clipboard
var unfocusedHandler: EventHandler<UnfocusedVisibleEvent>?
Link copied to clipboard
var visibilityChangedHandler: EventHandler<VisibilityChangedEvent>?
Link copied to clipboard
Link copied to clipboard
var visibleHandler: EventHandler<VisibleEvent>?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun addAttachable(attachable: Attachable)
Link copied to clipboard
fun addChildAt(child: LithoNode, index: Int)
Link copied to clipboard
fun addCustomBinders(binders: Map<Class<*>, RenderUnit.DelegateBinder<Any, Any, Any>>? = null)
Link copied to clipboard
fun addTransition(transition: Transition)
Link copied to clipboard
fun addViewCustomBinders(viewBindersMap: Map<Class<*>, RenderUnit.DelegateBinder<Any, Any, Any>>? = null)

The goal of this method is to add the optional mount binders to the associated to this LithoNode. If we are dealing with a Primitive, we will get the corresponding LithoNode and associate the binders map as optional mount binders. For this reason, this method should be called as soon as their RenderUnit is created. In Litho, this happens in the Resolve phase, specifically when the mount content preparation is invoked.

Link copied to clipboard
Link copied to clipboard
fun alignContent(alignContent: YogaAlign)
Link copied to clipboard
fun alignItems(alignItems: YogaAlign)
Link copied to clipboard
fun appendComponent(scopedComponentInfo: ScopedComponentInfo)
Link copied to clipboard
Link copied to clipboard
fun applyAttributes(c: Context, @AttrRes defStyleAttr: Int, @StyleRes defStyleRes: Int)
Link copied to clipboard
fun applyNodeInfo(nodeInfo: NodeInfo?)
Link copied to clipboard
fun applyParentDependentCommonProps(context: CalculationContext, parentLayoutDirection: LayoutDirection, parentImportantForAccessibility: Int = ImportantForAccessibility.IMPORTANT_FOR_ACCESSIBILITY_AUTO, parentEnabledState: Int = NodeInfo.ENABLED_UNSET, parentDuplicatesParentState: Boolean = true)
Link copied to clipboard
open fun background(background: Drawable? = null)
Link copied to clipboard
open fun backgroundColor(@ColorInt backgroundColor: Int)
Link copied to clipboard
open fun backgroundRes(context: Context, @DrawableRes resId: Int)
Link copied to clipboard
open fun border(border: Border)
open override fun border(widths: IntArray, colors: IntArray, radii: FloatArray, effect: PathEffect?)
Link copied to clipboard
open override fun calculateLayout(context: LayoutContext<LithoLayoutContext>, sizeConstraints: SizeConstraints): LithoLayoutResult
open fun calculateLayout(context: LayoutContext<LithoLayoutContext>, widthSpec: Int, heightSpec: Int): LayoutResult
Link copied to clipboard
fun child(child: LithoNode?)
fun child(resolveContext: ResolveContext, c: ComponentContext, child: Component?)
Link copied to clipboard
open override fun clone(): LithoNode
Link copied to clipboard
fun copyInto(target: LithoNode)
Link copied to clipboard
Link copied to clipboard
fun duplicateChildrenStates(duplicateChildrenStates: Boolean)
Link copied to clipboard
fun duplicateParentState(duplicateParentState: Boolean)
Link copied to clipboard
fun flexDirection(direction: YogaFlexDirection)
Link copied to clipboard
fun focusedHandler(focusedHandler: EventHandler<FocusedVisibleEvent>?)
Link copied to clipboard
open fun foreground(foreground: Drawable? = null)
Link copied to clipboard
open fun foregroundColor(@ColorInt foregroundColor: Int)
Link copied to clipboard
open fun foregroundRes(context: Context, @DrawableRes resId: Int)
Link copied to clipboard
fun fullImpressionHandler(fullImpressionHandler: EventHandler<FullImpressionVisibleEvent>?)
Link copied to clipboard
fun getChildAt(index: Int): LithoNode
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun importantForAccessibility(importantForAccessibility: Int): LithoNode
Link copied to clipboard
fun invisibleHandler(invisibleHandler: EventHandler<InvisibleEvent>?): LithoNode
Link copied to clipboard
fun justifyContent(justifyContent: YogaJustify)
Link copied to clipboard
fun layerType(type: Int, paint: Paint?)
Link copied to clipboard
open fun layoutDirection(direction: LayoutDirection)
Link copied to clipboard
Link copied to clipboard

Note: Is only resolved after layout.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setGap(gutter: YogaGutter, gapPx: Int)
Link copied to clipboard
fun setMeasureFunction(measureFunction: YogaMeasureFunction)
Link copied to clipboard
fun setNestedPadding(padding: Edges?, isPercentage: BooleanArray?)
Link copied to clipboard
Link copied to clipboard
fun stateListAnimator(stateListAnimator: StateListAnimator?)
Link copied to clipboard
Link copied to clipboard
fun testKey(testKey: String?)
Link copied to clipboard
fun touchExpansionPx(edge: YogaEdge, @Px touchExpansion: Int)
Link copied to clipboard
fun transferInto(target: LithoNode)
Link copied to clipboard
fun transitionKey(key: String?, ownerKey: String?)
Link copied to clipboard
fun transitionKeyType(type: Transition.TransitionKeyType?)
Link copied to clipboard
fun unfocusedHandler(unfocusedHandler: EventHandler<UnfocusedVisibleEvent>?)
Link copied to clipboard
fun visibilityChangedHandler(visibilityChangedHandler: EventHandler<VisibilityChangedEvent>?)
Link copied to clipboard
fun visibilityOutputTag(visibilityOutputTag: String?)
Link copied to clipboard
fun visibleHandler(visibleHandler: EventHandler<VisibleEvent>?)
Link copied to clipboard
fun visibleHeightRatio(visibleHeightRatio: Float)
Link copied to clipboard
fun visibleWidthRatio(visibleWidthRatio: Float)
Link copied to clipboard
fun wrap(wrap: YogaWrap)
Link copied to clipboard
open fun wrapInView()