ListBuilderKt

public final class ListBuilderKt


Summary

Public methods

static final @NonNull ListBuilder
ListBuilderKt.gridRow(
    ListBuilderDsl receiver,
    @ExtensionFunctionType Function1<GridRowBuilderDslUnit> buildGrid
)
static final @NonNull ListBuilder
ListBuilderKt.header(
    ListBuilderDsl receiver,
    @ExtensionFunctionType Function1<HeaderBuilderDslUnit> buildHeader
)
static final @NonNull ListBuilder
ListBuilderKt.inputRange(
    ListBuilderDsl receiver,
    @ExtensionFunctionType Function1<InputRangeBuilderDslUnit> buildInputRange
)
static final @NonNull Slice
list(
    Context context,
    Uri uri,
    long ttl,
    @ExtensionFunctionType Function1<ListBuilderDslUnit> addRows
)

Reduces verbosity required to build a Slice in Kotlin.

static final @NonNull ListBuilder
ListBuilderKt.range(
    ListBuilderDsl receiver,
    @ExtensionFunctionType Function1<RangeBuilderDslUnit> buildRange
)
static final @NonNull ListBuilder
ListBuilderKt.row(
    ListBuilderDsl receiver,
    @ExtensionFunctionType Function1<RowBuilderDslUnit> buildRow
)
static final @NonNull ListBuilder
ListBuilderKt.seeMoreRow(
    ListBuilderDsl receiver,
    @ExtensionFunctionType Function1<RowBuilderDslUnit> buildRow
)
static final @NonNull SliceAction
tapSliceAction(
    PendingIntent pendingIntent,
    IconCompat icon,
    @ListBuilder.ImageMode int imageMode,
    CharSequence title
)

Factory method to build a tappable SliceAction.

static final @NonNull SliceAction
toggleSliceAction(
    PendingIntent pendingIntent,
    IconCompat icon,
    CharSequence title,
    boolean isChecked
)

Factory method to build a toggleable SliceAction.

Public methods

ListBuilderKt.gridRow

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

ListBuilderKt.header

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

ListBuilderKt.inputRange

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

list

public static final @NonNull Slice list(
    Context context,
    Uri uri,
    long ttl,
    @ExtensionFunctionType Function1<ListBuilderDslUnit> addRows
)

Reduces verbosity required to build a Slice in Kotlin. Usage example:

val slice = list(context = context, uri = testUri, ttl = ListBuilder.INFINITY) {
    gridRow {
        setPrimaryAction(action)
        cell {
            addTitleText("Title 1")
            addImage(createIcon(R.drawable.ic_android_black_24dp), ListBuilder.SMALL_IMAGE)
            addText("Text 1")
        }
        cell {
            addTitleText("Title 2")
            addImage(createIcon(R.drawable.ic_android_black_24dp), ListBuilder.SMALL_IMAGE)
            addText("Text 2")
        }
    }
    row {
        setTitle("Title")
        setSubtitle("Subtitle")
        setPrimaryAction(sliceAction)
    }
}
See also
build

ListBuilderKt.range

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

ListBuilderKt.row

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