ListBuilder.RangeBuilder
class ListBuilder.RangeBuilder
RangeBuilderDsl |
Helper class annotated with @SliceMarker, which is annotated with @DslMarker. |
Builder to construct a range row which can be added to a ListBuilder.
A range row supports displaying a horizontal progress indicator.
| See also | |
|---|---|
addRange |
Summary
Public constructors |
|---|
|
Builder to construct a range row which can be added to a |
Public functions |
|
|---|---|
ListBuilder.RangeBuilder |
setContentDescription(description: CharSequence)Sets the content description. |
ListBuilder.RangeBuilder |
setLayoutDirection(layoutDirection: Int)Sets the desired layout direction for the content in this row. |
ListBuilder.RangeBuilder |
Set the upper limit of the range. |
ListBuilder.RangeBuilder |
Sets the progress bar mode, it could be the determinate or indeterminate mode. |
ListBuilder.RangeBuilder |
setPrimaryAction(action: SliceAction)Set the primary action for this row. |
ListBuilder.RangeBuilder |
setSubtitle(title: CharSequence)Set the subtitle. |
ListBuilder.RangeBuilder |
setTitle(title: CharSequence)Set the title. |
ListBuilder.RangeBuilder |
setTitleItem(icon: IconCompat, imageMode: Int)Sets the title item to be the provided icon. |
ListBuilder.RangeBuilder |
setTitleItem(icon: IconCompat, imageMode: Int, isLoading: Boolean)Sets the title item to be the provided icon. |
ListBuilder.RangeBuilder |
Set the current value of the range. |
Public constructors
RangeBuilder
RangeBuilder()
Builder to construct a range row which can be added to a ListBuilder.
A range row supports displaying a horizontal progress indicator. It supports two modes to represent progress: determinate and indeterminate, see setMode. Determinate mode is the default for progress indicator.
| See also | |
|---|---|
addRange |
Public functions
setContentDescription
fun setContentDescription(description: CharSequence): ListBuilder.RangeBuilder
Sets the content description.
setLayoutDirection
fun setLayoutDirection(layoutDirection: Int): ListBuilder.RangeBuilder
Sets the desired layout direction for the content in this row.
| Parameters | |
|---|---|
layoutDirection: Int |
the layout direction to set. |
setMax
fun setMax(max: Int): ListBuilder.RangeBuilder
Set the upper limit of the range. The default is 100.
setMode
fun setMode(mode: Int): ListBuilder.RangeBuilder
Sets the progress bar mode, it could be the determinate or indeterminate mode.
| Parameters | |
|---|---|
mode: Int |
the mode that progress bar should represent progress. |
setPrimaryAction
fun setPrimaryAction(action: SliceAction): ListBuilder.RangeBuilder
Set the primary action for this row.
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 MODE_SHORTCUT representation of the slice.
setSubtitle
fun setSubtitle(title: CharSequence): ListBuilder.RangeBuilder
Set the subtitle.
setTitle
fun setTitle(title: CharSequence): ListBuilder.RangeBuilder
Set the title.
setTitleItem
fun setTitleItem(icon: IconCompat, imageMode: Int): ListBuilder.RangeBuilder
Sets the title item to be the provided icon. There can only be one title item, this will replace any other title items that may have been set using this method or its overload setTitleItem.
| Parameters | |
|---|---|
icon: IconCompat |
the image to display. |
imageMode: Int |
the mode that image should be displayed in. |
| See also | |
|---|---|
ICON_IMAGE |
|
SMALL_IMAGE |
|
LARGE_IMAGE |
setTitleItem
fun setTitleItem(icon: IconCompat, imageMode: Int, isLoading: Boolean): ListBuilder.RangeBuilder
Sets the title item to be the provided icon. There can only be one title item, this will replace any other title items that may have been set using this method or its overload setTitleItem.
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.
| Parameters | |
|---|---|
icon: IconCompat |
the image to display. |
imageMode: Int |
the mode that image should be displayed in. |
isLoading: Boolean |
whether this content is being loaded in the background. |
| See also | |
|---|---|
ICON_IMAGE |
|
SMALL_IMAGE |
|
LARGE_IMAGE |
setValue
fun setValue(value: Int): ListBuilder.RangeBuilder
Set the current value of the range.