GridRowBuilderDsl
class GridRowBuilderDsl : GridRowBuilder
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 GridRowBuilder
GridRowBuilder |
addCell(@NonNull builder: GridRowBuilder.CellBuilder)
Add a cell to the grid builder.
|
GridRowBuilder |
setContentDescription(@NonNull description: CharSequence)
Sets the content description for the entire grid row.
|
GridRowBuilder |
setLayoutDirection(layoutDirection: Int)
Sets the desired layout direction for the content in this row.
|
GridRowBuilder |
setPrimaryAction(@NonNull action: SliceAction)
Sets the intent to send when the whole grid row is clicked.
If all the cells in the grid have specified a CellBuilder#setPrimaryAction(SliceAction) then the action set here on the GridRowBuilder may not ever be invoked.
If this grid row is the first row in ListBuilder , the action set here will be used to represent the slice when presented in androidx.slice.widget.SliceView#MODE_SHORTCUT .
|
GridRowBuilder |
setSeeMoreAction(@NonNull intent: PendingIntent)
If all content in a slice cannot be shown, a "see more" affordance may be displayed where the content is cut off. The action added here should take the user to an activity to see all of the content, and will be invoked when the "see more" affordance is tapped.
Only one see more affordance can be added, this throws IllegalStateException if a row or action has been previously added.
|
GridRowBuilder |
setSeeMoreAction(@NonNull callback: RemoteCallback)
If all content in a slice cannot be shown, a "see more" affordance may be displayed where the content is cut off. The action added here should take the user to an activity to see all of the content, and will be invoked when the "see more" affordance is tapped.
Only one see more affordance can be added, this throws IllegalStateException if a row or action has been previously added.
|
GridRowBuilder |
setSeeMoreCell(@NonNull builder: GridRowBuilder.CellBuilder)
If all content in a slice cannot be shown, the cell added here may be displayed where the content is cut off.
This method should only be used if you want to display a custom cell to indicate more content, consider using setSeeMoreAction(PendingIntent) otherwise. If you do choose to specify a custom cell, the cell should have CellBuilder#setContentIntent(PendingIntent) specified to take the user to an activity to see all of the content.
Only one see more affordance can be added, this throws IllegalStateException if a row or action has been previously added.
|
|
Public constructors
<init>
GridRowBuilderDsl()
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.