Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.

RangeBuilder

open class RangeBuilder
kotlin.Any
   ↳ androidx.slice.builders.ListBuilder.RangeBuilder

Builder to construct a range row which can be added to a ListBuilder.

A range row supports displaying a horizontal progress indicator.

Summary

Public constructors

Builder to construct a range row which can be added to a ListBuilder.

Public methods
open ListBuilder.RangeBuilder
setContentDescription(@NonNull description: CharSequence)

Sets the content description.

open ListBuilder.RangeBuilder
setLayoutDirection(layoutDirection: Int)

Sets the desired layout direction for the content in this row.

open ListBuilder.RangeBuilder
setMax(max: Int)

Set the upper limit of the range.

open ListBuilder.RangeBuilder
setMode(mode: Int)

Sets the progress bar mode, it could be the determinate or indeterminate mode.

open ListBuilder.RangeBuilder
setPrimaryAction(@NonNull action: SliceAction)

Set the primary action for this row.

open ListBuilder.RangeBuilder
setSubtitle(@NonNull title: CharSequence)

Set the subtitle.

open ListBuilder.RangeBuilder
setTitle(@NonNull title: CharSequence)

Set the title.

open ListBuilder.RangeBuilder
setTitleItem(@NonNull icon: IconCompat, imageMode: Int)

Sets the title item to be the provided icon.

open ListBuilder.RangeBuilder
setTitleItem(@NonNull icon: IconCompat, imageMode: Int, isLoading: Boolean)

Sets the title item to be the provided icon.

open ListBuilder.RangeBuilder
setValue(value: Int)

Set the current value of the range.

Public constructors

<init>

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(int). Determinate mode is the default for progress indicator.

Public methods

setContentDescription

@NonNull open fun setContentDescription(@NonNull description: CharSequence): ListBuilder.RangeBuilder

Sets the content description.

setLayoutDirection

@NonNull open 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

@NonNull open fun setMax(max: Int): ListBuilder.RangeBuilder

Set the upper limit of the range. The default is 100.

setMode

@NonNull open 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

@NonNull open fun setPrimaryAction(@NonNull 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 androidx.slice.widget.SliceView#MODE_SHORTCUT representation of the slice.

setSubtitle

@NonNull open fun setSubtitle(@NonNull title: CharSequence): ListBuilder.RangeBuilder

Set the subtitle.

setTitle

@NonNull open fun setTitle(@NonNull title: CharSequence): ListBuilder.RangeBuilder

Set the title.

setTitleItem

@NonNull open fun setTitleItem(
    @NonNull icon: