LithoNodeUtils

Functions

Link copied to clipboard
fun createBackgroundRenderUnit(node: LithoNode, width: Int, height: Int, diffNode: DiffNode? = null): LithoRenderUnit?

Creates a LithoRenderUnit for the background output iff the result has a background.

Link copied to clipboard
fun createBorderRenderUnit(node: LithoNode, border: BorderColorDrawable, width: Int, height: Int, diffNode: DiffNode? = null): LithoRenderUnit

Creates a LithoRenderUnit for the border output iff the result has borders.

Link copied to clipboard
fun createContentRenderUnit(node: LithoNode, areCachedMeasuresValid: Boolean, diffNode: DiffNode? = null): LithoRenderUnit?

Creates a LithoRenderUnit for the content output iff the result mounts content.

Link copied to clipboard
fun createDrawableRenderUnit(node: LithoNode, drawable: Drawable, width: Int, height: Int, outputType: Int, diffNode: DiffNode? = null): LithoRenderUnit

Common method to create the LithoRenderUnit for backgrounds, foregrounds, and border. The method uses the {@param outputType} to decide between the options. This method will call the shouldUpdate, and SpecGeneratedComponent.onBoundsDefined for the DrawableComponent.

Link copied to clipboard
fun createForegroundRenderUnit(node: LithoNode, width: Int, height: Int, diffNode: DiffNode? = null): LithoRenderUnit?

Creates a LithoRenderUnit for the foreground output iff the result has a foreground.

Link copied to clipboard

Creates a LithoRenderUnit for the host output iff the result needs a host view.

Link copied to clipboard
fun createRenderUnit(id: Long, component: Component, commonDynamicProps: SparseArray<DynamicValue<*>>? = null, context: ComponentContext? = null, node: LithoNode, importantForAccessibility: Int, updateState: Int, duplicateParentState: Boolean = false, duplicateChildrenStates: Boolean = false, hasHostView: Boolean = false, isMountViewSpec: Boolean = false, customDelegateBindersForMountSpec: Map<Class<*>, RenderUnit.DelegateBinder<Any, Any, Any>>? = null, debugKey: String? = null): LithoRenderUnit

Generic method to create a LithoRenderUnit.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun createViewAttributes(unit: LithoRenderUnit, component: Component, result: LayoutResult? = null, type: Int, importantForAccessibility: Int, disableBgFgOutputs: Boolean): ViewAttributes?
Link copied to clipboard
fun getDebugKey(componentKey: String?, outputUnitType: Int): String?