Properties

Link copied to clipboard

Functions

Link copied to clipboard

Ports setAccessibilityHeading into components world. However, since the aforementioned ViewCompat's method is available only on API 19 and above, calling this method on lower APIs will have no effect. On the legit versions, on the other hand, calling this method will lead to the component being treated as a heading. The AccessibilityHeading property allows accessibility services to help users navigate directly from one heading to the next. See setHeading for more information.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun alignContent(alignContent: YogaAlign?): Row.Builder

The AlignSelf property has the same options and effect as AlignItems but instead of affecting the children within a container, you can apply this property to a single child to change its alignment within its parent. See https://yogalayout.dev/docs/align-content for more information.

Link copied to clipboard
open override fun alignItems(alignItems: YogaAlign?): Row.Builder

The AlignItems property describes how to align children along the cross axis of their container. AlignItems is very similar to JustifyContent but instead of applying to the main axis, it applies to the cross axis. See https://yogalayout.dev/docs/align-items for more information.

Link copied to clipboard
open fun alignSelf(alignSelf: YogaAlign): Row.Builder

Controls how a child aligns in the cross direction, overriding the alignItems of the parent. See https://yogalayout.dev/docs/align-items for more information.

Link copied to clipboard
open fun alpha(value: DynamicValue<Float>): Row.Builder

Links a DynamicValue object ot the alpha value for this Component

open fun alpha(alpha: Float): Row.Builder

Sets the alpha (opacity) of this component.

Link copied to clipboard
open fun aspectRatio(aspectRatio: Float): Row.Builder

Defined as the ratio between the width and the height of a node. See https://yogalayout.dev/docs/aspect-ratio for more information

Link copied to clipboard
open fun background(@Nullable background: Drawable?): Row.Builder

Set the background of this component. The background drawable can implement for more efficient diffing while when drawables are remounted or updated.

Link copied to clipboard
open fun backgroundAttr(@AttrRes resId: Int, @DrawableRes defaultResId: Int): Row.Builder
Link copied to clipboard

Links a DynamicValue object to the background color value for this Component

open fun backgroundColor(@ColorInt backgroundColor: Int): Row.Builder
Link copied to clipboard

Links a DynamicValue object to the background drawable for this Component

Link copied to clipboard
Link copied to clipboard
open fun border(@Nullable border: Border?): Row.Builder
Link copied to clipboard
open override fun build(): Row
Link copied to clipboard
open override fun child(child: Component.Builder<*>?): Row.Builder
open override fun child(child: Component?): Row.Builder
Link copied to clipboard
open fun clickable(isClickable: Boolean): Row.Builder
Link copied to clipboard
Link copied to clipboard
open fun clipChildren(clipChildren: Boolean): Row.Builder

Ports setClipChildren into components world. However, there is no guarantee that child of this component would be translated into direct view child in the resulting view hierarchy.

Link copied to clipboard
open fun clipToOutline(clipToOutline: Boolean): Row.Builder
Link copied to clipboard
open fun componentTag(@Nullable componentTag: Any?): Row.Builder
Link copied to clipboard
open fun contentDescription(@Nullable contentDescription: CharSequence?): Row.Builder
open fun contentDescription(@StringRes stringId: Int, vararg formatArgs: Any): Row.Builder
Link copied to clipboard
open fun duplicateChildrenStates(duplicateChildrenStates: Boolean): Row.Builder

If true, component applies all of its children's drawable states (focused, pressed, etc.) to itself.

Link copied to clipboard
open fun duplicateParentState(duplicateParentState: Boolean): Row.Builder

If true, component duplicates its drawable state (focused, pressed, etc.) from the direct parent.

Link copied to clipboard
open fun enabled(isEnabled: Boolean): Row.Builder
Link copied to clipboard
open fun flex(flex: Float): Row.Builder

Sets flexGrow, flexShrink, and flexBasis at the same time.

Link copied to clipboard
open fun flexBasisAttr(@AttrRes resId: Int): Row.Builder
open fun flexBasisAttr(@AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun flexBasisDip(@Dimension(unit = 0) flexBasis: Float): Row.Builder
Link copied to clipboard
open fun flexBasisPercent(percent: Float): Row.Builder
Link copied to clipboard
open fun flexBasisPx(@Px flexBasis: Int): Row.Builder

The FlexBasis property is an axis-independent way of providing the default size of an item on the main axis. Setting the FlexBasis of a child is similar to setting the Width of that child if its parent is a container with FlexDirection = row or setting the Height of a child if its parent is a container with FlexDirection = column. The FlexBasis of an item is the default size of that item, the size of the item before any FlexGrow and FlexShrink calculations are performed. See https://yogalayout.dev/docs/flex for more information.

Link copied to clipboard
open fun flexBasisRes(@DimenRes resId: Int): Row.Builder
Link copied to clipboard
open fun flexGrow(flexGrow: Float): Row.Builder

If the sum of childrens' main axis dimensions is less than the minimum size, how much should this component grow? This value represents the "flex grow factor" and determines how much this component should grow along the main axis in relation to any other flexible children. See https://yogalayout.dev/docs/flex for more information.

Link copied to clipboard
open fun flexShrink(flexShrink: Float): Row.Builder

The FlexShrink property describes how to shrink children along the main axis in the case that the total size of the children overflow the size of the container on the main axis. See https://yogalayout.dev/docs/flex for more information.

Link copied to clipboard
open fun focusable(isFocusable: Boolean): Row.Builder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun foreground(@Nullable foreground: Drawable?): Row.Builder

Set the foreground of this component. The foreground drawable must extend for more efficient diffing while when drawables are remounted or updated. If the drawable does not extend ComparableDrawable then create a new class which extends ComparableDrawable and implement the isEquivalentTo.

Link copied to clipboard
open fun foregroundAttr(@AttrRes resId: Int, @DrawableRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun foregroundColor(@ColorInt foregroundColor: Int): Row.Builder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun gapDip(gutter: YogaGutter, @Dimension(unit = 0) gap: Float): Row.Builder

The Gap property is set on containers and spaces children evenly by a given length along a given axis

Link copied to clipboard
open override fun gapPx(gutter: YogaGutter, px: Int): Row.Builder
Link copied to clipboard
Link copied to clipboard
open override fun getThis(): Row.Builder
Link copied to clipboard
open fun handle(@Nullable handle: Handle?): Row.Builder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun heightAttr(@AttrRes resId: Int): Row.Builder
open fun heightAttr(@AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun heightDip(@Dimension(unit = 0) height: Float): Row.Builder
Link copied to clipboard
open fun heightPercent(percent: Float): Row.Builder

Sets the height of the Component to be a percentage of its parent's height. Note that if the parent has unspecified height (e.g. it is a RecyclerView), then setting this will have no effect.

Link copied to clipboard
open fun heightPx(@Px height: Int): Row.Builder

Specifies the height of the element's content area. See https://yogalayout.dev/docs/width-height for more information

Link copied to clipboard
open fun heightRes(@DimenRes resId: Int): Row.Builder
Link copied to clipboard
open fun importantForAccessibility(importantForAccessibility: Int): Row.Builder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isReferenceBaseline(isReferenceBaseline: Boolean): Row.Builder
Link copied to clipboard
open override fun justifyContent(justifyContent: YogaJustify?): Row.Builder

The JustifyContent property describes how to align children within the main axis of a container. For example, you can use this property to center a child horizontally within a container with FlexDirection = Row or vertically within one with FlexDirection = Column. See https://yogalayout.dev/docs/justify-content for more information.

Link copied to clipboard
open fun key(@Nullable key: String?): Row.Builder

Set a key on the component that is local to its parent.

Link copied to clipboard
open fun keyboardNavigationCluster(isKeyboardNavigationCluster: Boolean): Row.Builder
Link copied to clipboard

Backwards compatibility for a Kotlin Component to accept a Style and apply it to a Java Spec Component. Using this builder method is the equivalent of setting all common props the Style defines.

Link copied to clipboard
open fun layerType(type: Int, @Nullable paint: Paint?): Row.Builder
Link copied to clipboard
open fun layoutDirection(direction: YogaDirection): Row.Builder

The RTL/LTR direction of components and text. Determines whether START and END will resolve to the left or right side, among other things. INHERIT indicates this setting will be inherited from this component's parent.

Link copied to clipboard
Link copied to clipboard
open fun marginAttr(edge: YogaEdge, @AttrRes resId: Int): Row.Builder
open fun marginAttr(edge: YogaEdge, @AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun marginAuto(edge: YogaEdge): Row.Builder
Link copied to clipboard
open fun marginDip(edge: YogaEdge, @Dimension(unit = 0) margin: Float): Row.Builder
Link copied to clipboard
open fun marginPercent(edge: YogaEdge, percent: Float): Row.Builder
Link copied to clipboard
open fun marginPx(edge: YogaEdge, @Px margin: Int): Row.Builder

Effects the spacing around the outside of a node. A node with margin will offset itself from the bounds of its parent but also offset the location of any siblings. See https://yogalayout.dev/docs/margins-paddings-borders for more information

Link copied to clipboard
open fun marginRes(edge: YogaEdge, @DimenRes resId: Int): Row.Builder
Link copied to clipboard
open fun maxHeightAttr(@AttrRes resId: Int): Row.Builder
open fun maxHeightAttr(@AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun maxHeightDip(@Dimension(unit = 0) maxHeight: Float): Row.Builder
Link copied to clipboard
open fun maxHeightPercent(percent: Float): Row.Builder
Link copied to clipboard
open fun maxHeightPx(@Px maxHeight: Int): Row.Builder
Link copied to clipboard
open fun maxHeightRes(@DimenRes resId: Int): Row.Builder
Link copied to clipboard
open fun maxWidthAttr(@AttrRes resId: Int): Row.Builder
open fun maxWidthAttr(@AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun maxWidthDip(@Dimension(unit = 0) maxWidth: Float): Row.Builder
Link copied to clipboard
open fun maxWidthPercent(percent: Float): Row.Builder
Link copied to clipboard
open fun maxWidthPx(@Px maxWidth: Int): Row.Builder
Link copied to clipboard
open fun maxWidthRes(@DimenRes resId: Int): Row.Builder
Link copied to clipboard
open fun minHeightAttr(@AttrRes resId: Int): Row.Builder
open fun minHeightAttr(@AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun minHeightDip(@Dimension(unit = 0) minHeight: Float): Row.Builder
Link copied to clipboard
open fun minHeightPercent(percent: Float): Row.Builder
Link copied to clipboard
open fun minHeightPx(@Px minHeight: Int): Row.Builder
Link copied to clipboard
open fun minHeightRes(@DimenRes resId: Int): Row.Builder
Link copied to clipboard
open fun minWidthAttr(@AttrRes resId: Int): Row.Builder
open fun minWidthAttr(@AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun minWidthDip(@Dimension(unit = 0) minWidth: Float): Row.Builder
Link copied to clipboard
open fun minWidthPercent(percent: Float): Row.Builder
Link copied to clipboard
open fun minWidthPx(@Px minWidth: Int): Row.Builder

This property has higher priority than all other properties and will always be respected. See https://yogalayout.dev/docs/min-max/ for more information

Link copied to clipboard
open fun minWidthRes(@DimenRes resId: Int): Row.Builder
Link copied to clipboard
Link copied to clipboard
open fun paddingAttr(edge: YogaEdge, @AttrRes resId: Int): Row.Builder
open fun paddingAttr(edge: YogaEdge, @AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun paddingDip(edge: YogaEdge, @Dimension(unit = 0) padding: Float): Row.Builder
Link copied to clipboard
open fun paddingPercent(edge: YogaEdge, percent: Float): Row.Builder
Link copied to clipboard
open fun paddingPx(edge: YogaEdge, @Px padding: Int): Row.Builder

Affects the size of the node it is applied to. Padding will not add to the total size of an element if it has an explicit size set. See https://yogalayout.dev/docs/margins-paddings-borders for more information

Link copied to clipboard
open fun paddingRes(edge: YogaEdge, @DimenRes resId: Int): Row.Builder
Link copied to clipboard
open fun positionAttr(edge: YogaEdge, @AttrRes resId: Int): Row.Builder
open fun positionAttr(edge: YogaEdge, @AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun positionDip(edge: YogaEdge, @Dimension(unit = 0) position: Float): Row.Builder
Link copied to clipboard
open fun positionPercent(edge: YogaEdge, percent: Float): Row.Builder
Link copied to clipboard
open fun positionPx(edge: YogaEdge, @Px position: Int): Row.Builder

When used in combination with positionType of ABSOLUTE, allows the component to specify how it should be positioned within its parent. See https://yogalayout.dev/docs/absolute-relative-layout for more information.

Link copied to clipboard
open fun positionRes(edge: YogaEdge, @DimenRes resId: Int): Row.Builder
Link copied to clipboard
open fun positionType(positionType: YogaPositionType): Row.Builder

Controls how this component will be positioned within its parent. See https://yogalayout.dev/docs/absolute-relative-layout for more details.

Link copied to clipboard
open override fun reverse(reverse: Boolean): Row.Builder

Set this to true if you want the container to be laid out in reverse.

Link copied to clipboard

Links a DynamicValue object to the rotation value for this Component

open fun rotation(rotation: Float): Row.Builder

Sets the degree that this component is rotated around the pivot point. Increasing the value results in clockwise rotation. By default, the pivot point is centered on the component.

Link copied to clipboard
open fun rotationX(rotationX: Float): Row.Builder

Sets the degree that this component is rotated around the horizontal axis through the pivot point.

Link copied to clipboard
open fun rotationY(rotationY: Float): Row.Builder

Sets the degree that this component is rotated around the vertical axis through the pivot point.

Link copied to clipboard
open fun scale(scale: Float): Row.Builder

Sets the scale (scaleX and scaleY) on this component. This is mostly relevant for animations and being able to animate size changes. Otherwise for non-animation usecases, you should use the standard layout properties to control the size of your component.

Link copied to clipboard

Links a DynamicValue object to the scaleX value for this Component

Link copied to clipboard

Links a DynamicValue object to the scaleY value for this Component

Link copied to clipboard
open fun selected(isSelected: Boolean): Row.Builder
Link copied to clipboard
Link copied to clipboard

Links a DynamicValue object to the elevation value for this Component

Link copied to clipboard
open fun shadowElevationAttr(@AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun shadowElevationDip(@Dimension(unit = 0) shadowElevation: Float): Row.Builder
Link copied to clipboard
open fun shadowElevationPx(shadowElevation: Float): Row.Builder
Link copied to clipboard
Link copied to clipboard
open fun stateListAnimator(@Nullable stateListAnimator: StateListAnimator?): Row.Builder

Ports setStateListAnimator into components world. However, since the aforementioned view's method is available only on API 21 and above, calling this method on lower APIs will have no effect. On the legit versions, on the other hand, calling this method will lead to the component being wrapped into a view

Link copied to clipboard

Ports setStateListAnimator into components world. However, since the aforementioned view's method is available only on API 21 and above, calling this method on lower APIs will have no effect. On the legit versions, on the other hand, calling this method will lead to the component being wrapped into a view

Link copied to clipboard
open fun testKey(@Nullable testKey: String?): Row.Builder
Link copied to clipboard
open fun tooltipText(@Nullable tooltipText: String?): Row.Builder
Link copied to clipboard
open fun touchExpansionAttr(edge: YogaEdge, @AttrRes resId: Int): Row.Builder
open fun touchExpansionAttr(edge: YogaEdge, @AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun touchExpansionDip(edge: YogaEdge, @Dimension(unit = 0) touchExpansion: Float): Row.Builder
Link copied to clipboard
open fun touchExpansionPx(edge: YogaEdge, @Px touchExpansion: Int): Row.Builder
Link copied to clipboard
open fun touchExpansionRes(edge: YogaEdge, @DimenRes resId: Int): Row.Builder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun transitionName(@Nullable transitionName: String?): Row.Builder
Link copied to clipboard

Links a DynamicValue object to the translationX value for this Component

Link copied to clipboard

Links a DynamicValue object to the translationY value for this Component

Link copied to clipboard
Link copied to clipboard
open fun useHeightAsBaseline(useHeightAsBaseline: Boolean): Row.Builder

When set to true, overrides the default behaviour of baseline calculation and uses height of component as baseline. By default the baseline of a component is the baseline of first child of component (If the component does not have any child then baseline is height of the component)

Link copied to clipboard
open fun viewId(id: Int): Row.Builder
Link copied to clipboard
open fun viewTag(@Nullable viewTag: Any?): Row.Builder
Link copied to clipboard
open fun viewTags(@Nullable viewTags: SparseArray<Any>?): Row.Builder
Link copied to clipboard
Link copied to clipboard
open fun visibilityOutputTag(@Nullable visibilityOutputTag: String?): Row.Builder
Link copied to clipboard
Link copied to clipboard
open fun visibleHeightRatio(visibleHeightRatio: Float): Row.Builder
Link copied to clipboard
open fun visibleWidthRatio(visibleWidthRatio: Float): Row.Builder
Link copied to clipboard
open fun widthAttr(@AttrRes resId: Int): Row.Builder
open fun widthAttr(@AttrRes resId: Int, @DimenRes defaultResId: Int): Row.Builder
Link copied to clipboard
open fun widthDip(@Dimension(unit = 0) width: Float): Row.Builder
Link copied to clipboard
open fun widthPercent(percent: Float): Row.Builder

Sets the width of the Component to be a percentage of its parent's width. Note that if the parent has unspecified width (e.g. it is an HScroll), then setting this will have no effect.

Link copied to clipboard
open fun widthPx(@Px width: Int): Row.Builder

Specifies the width of the element's content area. See https://yogalayout.dev/docs/width-height for more information

Link copied to clipboard
open fun widthRes(@DimenRes resId: Int): Row.Builder
Link copied to clipboard
open override fun wrap(wrap: YogaWrap?): Row.Builder

The FlexWrap property is set on containers and controls what happens when children overflow the size of the container along the main axis. If a container specifies WRAP then its children will wrap to the next line instead of overflowing.

Link copied to clipboard