ListBuilder.RangeBuilder
public 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 methods |
|
|---|---|
@NonNull ListBuilder.RangeBuilder |
setContentDescription(@NonNull CharSequence description)Sets the content description. |
@NonNull ListBuilder.RangeBuilder |
setLayoutDirection(int layoutDirection)Sets the desired layout direction for the content in this row. |
@NonNull ListBuilder.RangeBuilder |
setMax(int max)Set the upper limit of the range. |
@NonNull ListBuilder.RangeBuilder |
setMode(int mode)Sets the progress bar mode, it could be the determinate or indeterminate mode. |
@NonNull ListBuilder.RangeBuilder |
setPrimaryAction(@NonNull SliceAction action)Set the primary action for this row. |
@NonNull ListBuilder.RangeBuilder |
setSubtitle(@NonNull CharSequence title)Set the subtitle. |
@NonNull ListBuilder.RangeBuilder |
setTitle(@NonNull CharSequence title)Set the title. |
@NonNull ListBuilder.RangeBuilder |
setTitleItem(@NonNull IconCompat icon, int imageMode)Sets the title item to be the provided icon. |
@NonNull ListBuilder.RangeBuilder |
setTitleItem(@NonNull IconCompat icon, int imageMode, boolean isLoading)Sets the title item to be the provided icon. |
@NonNull ListBuilder.RangeBuilder |
setValue(int value)Set the current value of the range. |
Public constructors
RangeBuilder
public 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 methods
setContentDescription
public @NonNull ListBuilder.RangeBuilder setContentDescription(@NonNull CharSequence description)
Sets the content description.
setLayoutDirection
public @NonNull ListBuilder.RangeBuilder setLayoutDirection(int layoutDirection)
Sets the desired layout direction for the content in this row.
| Parameters | |
|---|---|
int layoutDirection |
the layout direction to set. |
setMax
public @NonNull ListBuilder.RangeBuilder setMax(int max)
Set the upper limit of the range. The default is 100.
setMode
public @NonNull ListBuilder.RangeBuilder setMode(int mode)
Sets the progress bar mode, it could be the determinate or indeterminate mode.
| Parameters | |
|---|---|
int mode |
the mode that progress bar should represent progress. |
setPrimaryAction
public @NonNull ListBuilder.RangeBuilder setPrimaryAction(@NonNull SliceAction action)
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
public @NonNull ListBuilder.RangeBuilder setSubtitle(@NonNull CharSequence title)
Set the subtitle.
setTitle
public @NonNull ListBuilder.RangeBuilder setTitle(@NonNull CharSequence title)
Set the title.
setTitleItem
public @NonNull ListBuilder.RangeBuilder setTitleItem(@NonNull IconCompat icon, int imageMode)
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 | |
|---|---|
@NonNull IconCompat icon |
the image to display. |
int imageMode |
the mode that image should be displayed in. |
| See also | |
|---|---|
ICON_IMAGE |
|
SMALL_IMAGE |
|
LARGE_IMAGE |
setTitleItem
public @NonNull ListBuilder.RangeBuilder setTitleItem(@NonNull IconCompat icon, int imageMode, boolean isLoading)
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 | |
|---|---|
@NonNull IconCompat icon |
the image to display. |
int imageMode |
the mode that image should be displayed in. |
boolean isLoading |
whether this content is being loaded in the background. |
| See also | |
|---|---|
ICON_IMAGE |
|
SMALL_IMAGE |
|
LARGE_IMAGE |
setValue
public @NonNull ListBuilder.RangeBuilder setValue(int value)
Set the current value of the range.
| Parameters | |
|---|---|
int value |
the value of the range, between 0 and |