ListBuilderDsl


public final class ListBuilderDsl extends ListBuilder


Helper class annotated with @SliceMarker, which is annotated with @DslMarker. Two implicit receivers that are annotated with @SliceMarker are not accessible in the same scope, ensuring a type-safe DSL.

Summary

Public constructors

ListBuilderDsl(@NonNull Context context, @NonNull Uri uri, long ttl)

Extension functions

final @NonNull ListBuilder
final @NonNull ListBuilder
ListBuilderKt.header(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull HeaderBuilderDslUnit> buildHeader
)
final @NonNull ListBuilder
ListBuilderKt.inputRange(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull InputRangeBuilderDslUnit> buildInputRange
)
final @NonNull ListBuilder
ListBuilderKt.range(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull RangeBuilderDslUnit> buildRange
)
final @NonNull ListBuilder
ListBuilderKt.row(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull RowBuilderDslUnit> buildRow
)
final @NonNull ListBuilder

Inherited methods

From androidx.slice.builders.ListBuilder
@NonNull ListBuilder

Adds an action to this list builder.

@NonNull ListBuilder

Add a grid row to the list builder.

@NonNull ListBuilder

Add an input range row to the list builder.

@NonNull ListBuilder

Add a range row to the list builder.

@NonNull ListBuilder

Add an star rating row to the list builder.

@NonNull ListBuilder

Add a row to the list builder.

@NonNull ListBuilder

Add a selection row to the list builder.

@NonNull Slice

Construct the slice.

@NonNull ListBuilder

Sets the color to use on tintable items within the list builder.

@NonNull ListBuilder

Sets a header for this list builder.

@NonNull ListBuilder

Sets additional information to be passed to the host of the slice.

@NonNull ListBuilder
setIsError(boolean isError)

Sets whether this slice indicates an error, i.e. the normal contents of this slice are unavailable and instead the slice contains a message indicating an error.

@NonNull ListBuilder

Sets keywords to associate with this slice.

@NonNull ListBuilder
setLayoutDirection(int layoutDirection)

Sets the desired layout direction for this slice.

@NonNull ListBuilder

If all content in a slice cannot be shown, a "see more" affordance may be displayed where the content is cut off.

@NonNull ListBuilder

If all content in a slice cannot be shown, a "see more" affordance may be displayed where the content is cut off.

@NonNull ListBuilder

If all content in a slice cannot be shown, the row added here may be displayed where the content is cut off.

Public constructors

ListBuilderDsl

Added in 1.0.0-alpha08
public ListBuilderDsl(@NonNull Context context, @NonNull Uri uri, long ttl)

Extension functions

ListBuilderKt.gridRow

public final @NonNull ListBuilder ListBuilderKt.gridRow(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull GridRowBuilderDslUnit> buildGrid
)
See also
addGridRow

ListBuilderKt.header

public final @NonNull ListBuilder ListBuilderKt.header(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull HeaderBuilderDslUnit> buildHeader
)
See also
setHeader

ListBuilderKt.inputRange

public final @NonNull ListBuilder ListBuilderKt.inputRange(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull InputRangeBuilderDslUnit> buildInputRange
)
See also
addInputRange

ListBuilderKt.range

public final @NonNull ListBuilder ListBuilderKt.range(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull RangeBuilderDslUnit> buildRange
)
See also
addRange

ListBuilderKt.row

public final @NonNull ListBuilder ListBuilderKt.row(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull RowBuilderDslUnit> buildRow
)
See also
addRow

ListBuilderKt.seeMoreRow

public final @NonNull ListBuilder ListBuilderKt.seeMoreRow(
    @NonNull ListBuilderDsl receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull RowBuilderDslUnit> buildRow
)
See also
setSeeMoreRow