StackContainerScope

Constructors

Link copied to clipboard
constructor(context: ComponentContext)

Properties

Link copied to clipboard
open override val androidContext: Context
Link copied to clipboard
open override val context: ComponentContext
Link copied to clipboard
open override val resourceResolver: ResourceResolver
Link copied to clipboard
open val <T> TreeProp<T>.value: T

Functions

Link copied to clipboard
fun child(component: Component, zIndex: Int = children.size, key: String? = null)

Adds a Component as a child to the Stack being initialized.

Link copied to clipboard
fun BaseResourcesScope.drawableColor(@ColorInt color: Int): Drawable
fun BaseResourcesScope.drawableColor(@ColorInt color: Long): Drawable

Return a android.graphics.drawable.Drawable for a ColorInt value as a Drawable instance.

Link copied to clipboard
open fun getIntAttrValue(componentContext: ComponentContext, @StyleableRes id: Int, @StyleableRes attrs: IntArray, defaultValue: Int): Int

Retrieves a styled attribute value for provided {@param id}.

Link copied to clipboard
inline fun <T : Any> ResourcesScope.getTreeProp(): T?

Returns the instance registered for the type T in this hierarchy, and null if no value was registered. Tree props are registered for a sub-hierarchy via TreePropProvider or com.facebook.litho.annotations.OnCreateTreeProp in the Spec API.

Link copied to clipboard
inline fun ResourcesScope.NullableWrapper(name: String? = null, style: Style, crossinline content: ResourcesScope.() -> Component?): Wrapper?

Builder function for creating Wrapper components for a nullable content. It's useful for adding additional Style props to a given component.

Link copied to clipboard

Returns the instance registered for the type T in this hierarchy, throws if no value was registered. Tree props are registered for a sub-hierarchy via TreePropProvider or com.facebook.litho.annotations.OnCreateTreeProp in the Spec API.

Link copied to clipboard
inline fun ResourcesScope.StackLayout(alignContent: YogaAlign? = null, alignItems: YogaAlign? = null, justifyContent: YogaJustify? = null, wrap: YogaWrap? = null, gap: Dimen? = null, style: Style = Style, noinline children: StackContainerScope.() -> Unit): Component

A layout component that stacks its children on top of each other. Each child is positioned absolutely within the container, allowing them to overlap.

Link copied to clipboard
open fun Dimen.toPixels(): Int
Link copied to clipboard
inline fun ResourcesScope.Wrapper(name: String? = null, style: Style, crossinline content: ResourcesScope.() -> Component): Wrapper

Builder function for creating Wrapper components. It's useful for adding additional Style props to a given component.