FlexboxContainerScope

class FlexboxContainerScope(val context: ComponentContext, children: MutableList<Component> = mutableListOf()) : ResourcesScope

The implicit receiver for the trailing lambda on ResourcesScope.Column or ResourcesScope.Row. The receiver gives the ability to add children to this container.

Constructors

Link copied to clipboard
constructor(context: ComponentContext, children: MutableList<Component> = mutableListOf())

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?)

Adds a Component as a child to the Row or Column being initialized.

Link copied to clipboard
inline fun ResourcesScope.Column(alignContent: YogaAlign? = null, alignItems: YogaAlign? = null, justifyContent: YogaJustify? = null, wrap: YogaWrap? = null, isReversed: Boolean = false, gap: Dimen? = null, style: Style? = null): Column

Constructs a new Column without any children.

inline fun ResourcesScope.Column(alignContent: YogaAlign? = null, alignItems: YogaAlign? = null, justifyContent: YogaJustify? = null, wrap: YogaWrap? = null, isReversed: Boolean = false, gap: Dimen? = null, style: Style? = null, init: FlexboxContainerScope.() -> Unit): Column

Constructs a new Column. Add children by using FlexboxContainerScope.child or FlexboxContainerScope.children:

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

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.Row(alignContent: YogaAlign? = null, alignItems: YogaAlign? = null, justifyContent: YogaJustify? = null, wrap: YogaWrap? = null, isReversed: Boolean = false, gap: Dimen? = null, style: Style? = null): Row

Constructs a new Column without any children.

inline fun ResourcesScope.Row(alignContent: YogaAlign? = null, alignItems: YogaAlign? = null, justifyContent: YogaJustify? = null, wrap: YogaWrap? = null, isReversed: Boolean = false, gap: Dimen? = null, style: Style? = null, init: FlexboxContainerScope.() -> Unit): Row

Constructs a new Row. Add children by using FlexboxContainerScope.child or FlexboxContainerScope.children:

Link copied to clipboard
open fun Dimen.toPixels(): Int
Link copied to clipboard
inline fun ResourcesScope.Wrapper(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.