RowBuilderDsl
class RowBuilderDsl : ListBuilder.RowBuilder
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 |
Helper class annotated with @SliceMarker, which is annotated with @DslMarker.
|
Inherited functions |
From class RowBuilder
ListBuilder.RowBuilder |
addEndItem(timeStamp: Long)
Adds a timestamp to the end items of the row builder. Only one timestamp can be added, if one is already added this will throw IllegalArgumentException .
|
ListBuilder.RowBuilder |
addEndItem(@NonNull icon: IconCompat, imageMode: Int)
Adds an icon to the end items of the row builder.
|
ListBuilder.RowBuilder |
addEndItem(@Nullable icon: IconCompat?, imageMode: Int, isLoading: Boolean)
Adds an icon to the end items of the row builder.
When set to true, the parameter isLoading indicates that the app is doing work to load this content in the background, in this case the template displays a placeholder until updated.
|
ListBuilder.RowBuilder |
addEndItem(@NonNull action: SliceAction)
Adds an action to the end items of the row builder. A mixture of icons and actions is not permitted. If an icon has already been added, this will throw IllegalArgumentException .
|
ListBuilder.RowBuilder |
addEndItem(@NonNull action: SliceAction, isLoading: Boolean)
Adds an action to the end items of the row builder. A mixture of icons and actions is not permitted. If an icon has already been added, this will throw IllegalArgumentException .
Use this method to specify content that will appear in the template once it's been loaded.
|
ListBuilder.RowBuilder |
setContentDescription(@NonNull description: CharSequence)
Sets the content description for the row.
|
ListBuilder.RowBuilder |
setEndOfSection(isEndOfSection: Boolean)
Indicate that this row is an end for a section.
|
ListBuilder.RowBuilder |
setLayoutDirection(layoutDirection: Int)
Sets the desired layout direction for the content in this row.
|
ListBuilder.RowBuilder |
setPrimaryAction(@NonNull action: SliceAction)
The action specified here will be sent when the whole row is clicked.
If this is the first row in a ListBuilder this action will also be used to define the androidx.slice.widget.SliceView#MODE_SHORTCUT representation of the slice.
|
ListBuilder.RowBuilder |
setSubtitle(@NonNull subtitle: CharSequence)
Sets the subtitle for the row builder. A subtitle should fit on a single line and is ellipsized if too long.
|
ListBuilder.RowBuilder |
setSubtitle(@Nullable subtitle: CharSequence?, isLoading: Boolean)
Sets the subtitle for the row builder. A subtitle should fit on a single line and is ellipsized if too long.
Use this method to specify content that will appear in the template once it's been loaded.
|
ListBuilder.RowBuilder |
setTitle(@NonNull title: CharSequence)
Sets the title for the row builder. A title should fit on a single line and is ellipsized if too long.
|
ListBuilder.RowBuilder |
setTitle(@Nullable title: CharSequence?, isLoading: Boolean)
Sets the title for the row builder. A title should fit on a single line and is ellipsized if too long.
Use this method to specify content that will appear in the template once it's been loaded.
|
ListBuilder.RowBuilder |
setTitleItem(timeStamp: Long)
Sets the title item to be the provided timestamp. Only one timestamp can be added, if one is already added this will throw IllegalArgumentException .
There can only be one title item, this will replace any other title items that may have been set.
|
ListBuilder.RowBuilder |
setTitleItem(@NonNull icon: IconCompat, imageMode: Int)
Sets the title item to be the provided icon. There can only be one title item, this will replace any other | |