🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

ContextualFlowColumnOverflow

Overflow Handling Options This enumeration defines the available options for handling content that exceeds the boundaries of its container for ContextualFlowColumn.

Source set: Common
@Deprecated("ContextualFlowLayouts are no longer maintained")
public class ContextualFlowColumnOverflow private constructor(
    type: OverflowType,
    minLinesToShowCollapse: Int = 0,
    minCrossAxisSizeToShowCollapse: Int = 0,
    seeMoreGetter: ((state: FlowLayoutOverflowState) -> @Composable () -> Unit)? = null,
    collapseGetter: ((state: FlowLayoutOverflowState) -> @Composable () -> Unit)? = null,
) :
    FlowLayoutOverflow(
        type,
        minLinesToShowCollapse,
        minCrossAxisSizeToShowCollapse,
        seeMoreGetter,
        collapseGetter,
    )

Overflow Handling Options

This enumeration defines the available options for handling content that exceeds the boundaries of its container for ContextualFlowColumn.

Options:

    overlapping with other elements. Use this option when it's crucial to display all content, regardless of the container's size.

  • Visible: The overflowing content remains visible outside its container. This can lead to
  • container. Ideal for maintaining a clean and uncluttered UI, where overlapping elements are undesirable.

  • Clip: The overflowing content is clipped and not visible beyond the boundary of its
  • that more items can be loaded.

  • expandIndicator: Behaves similar to Clip, however shows an indicator or button indicating
  • option. After expanding the content, users can choose to collapse it back to the summary view.

  • expandOrCollapseIndicator: Extends the expandIndicator functionality by adding a 'Collapse'

Members

Companion

Source set: Common
@Deprecated("ContextualFlowLayouts are no longer maintained")
    public companion object

Properties

Visible

Source set: Common
public val Visible: ContextualFlowColumnOverflow =
            ContextualFlowColumnOverflow(FlowLayoutOverflow.OverflowType.Visible)

Display all content, even if there is not enough space in the specified bounds.

Clip

Source set: Common
public val Clip: ContextualFlowColumnOverflow =
            ContextualFlowColumnOverflow(FlowLayoutOverflow.OverflowType.Clip)

Clip the overflowing content to fix its container.

Functions

expandIndicator

Source set: Common
public fun expandIndicator(
            content: @Composable ContextualFlowColumnOverflowScope.() -> Unit
        ): ContextualFlowColumnOverflow

Registers an "expand indicator" composable for handling overflow in a ContextualFlowColumn.

This function allows the creation of a custom composable that can be displayed when there are more items in the ContextualFlowColumn than can be displayed in the available space. The "expandable indicator" composable can be tailored to show a summary, a button, or any other composable element that indicates the presence of additional items.

Parameters

content composable that visually indicates more items can be loaded.

expandOrCollapseIndicator

Source set: Common
@Composable
        public fun expandOrCollapseIndicator(
            expandIndicator: @Composable ContextualFlowColumnOverflowScope.() -> Unit,
            collapseIndicator: @Composable ContextualFlowColumnOverflowScope.() -> Unit,
            minColumnsToShowCollapse: Int = 1,
            minWidthToShowCollapse: Dp = 0.dp,
        ): ContextualFlowColumnOverflow

Registers an "expand or collapse indicator" composable for handling overflow in a ContextualFlowColumn.

This function is designed to switch between two states: a "Expandable" state when there are more items to show, and a "Collapsable" state when all items are being displayed and can be collapsed.

Prior to layout, the function evaluates both composables indicators to determine their maximum intrinsic size. Depending on the space available and the number of items, either the expandIndicator or the collapseIndicator is rendered.

Parameters

minColumnsToShowCollapse Specifies the minimum number of columns that should be visible before showing the collapse option. This parameter is useful when the number of columns is too small to be reduced further.
minWidthToShowCollapse Specifies the minimum width at which the collapse option should be displayed. This parameter is useful for preventing the collapse option from appearing when the width is too narrow.
expandIndicator composable that visually indicates more items can be loaded.
collapseIndicator composable that visually indicates less items can be loaded.