InputRangeBuilder
open class InputRangeBuilder
kotlin.Any | |
↳ | androidx.slice.builders.ListBuilder.InputRangeBuilder |
Builder to construct a input range row.
An input range row supports displaying a horizontal slider allowing slider input.
Summary
Public constructors |
|
---|---|
<init>() Builder to construct a input range row. |
Public methods |
|
---|---|
open ListBuilder.InputRangeBuilder |
setContentDescription(@NonNull description: CharSequence) Sets the content description. |
open ListBuilder.InputRangeBuilder |
setInputAction(@NonNull action: PendingIntent) Set the |
open ListBuilder.InputRangeBuilder |
setInputAction(@NonNull callback: RemoteCallback) Set the |
open ListBuilder.InputRangeBuilder |
setLayoutDirection(layoutDirection: Int) Sets the desired layout direction for the content in this row. |
open ListBuilder.InputRangeBuilder |
Set the upper limit of the range. |
open ListBuilder.InputRangeBuilder |
Set the lower limit of the range. |
open ListBuilder.InputRangeBuilder |
setPrimaryAction(@NonNull action: SliceAction) Set the primary action for this row. |
open ListBuilder.InputRangeBuilder |
setSubtitle(@NonNull title: CharSequence) Set the subtitle. |
open ListBuilder.InputRangeBuilder |
setThumb(@NonNull thumb: IconCompat) Set the |
open ListBuilder.InputRangeBuilder |
setTitle(@NonNull title: CharSequence) Set the title. |
open ListBuilder.InputRangeBuilder |
Set the current value of the range. |
Public constructors
<init>
InputRangeBuilder()
Builder to construct a input range row.
An input range row supports displaying a horizontal slider allowing slider input.
Public methods
setContentDescription
@NonNull open fun setContentDescription(@NonNull description: CharSequence): ListBuilder.InputRangeBuilder
Sets the content description.
setInputAction
@NonNull open fun setInputAction(@NonNull action: PendingIntent): ListBuilder.InputRangeBuilder
Set the PendingIntent
to send when the current value is updated.
setInputAction
@NonNull open fun setInputAction(@NonNull callback: RemoteCallback): ListBuilder.InputRangeBuilder
Set the PendingIntent
to send when the current value is updated.
setLayoutDirection
@NonNull open fun setLayoutDirection(layoutDirection: Int): ListBuilder.InputRangeBuilder
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.InputRangeBuilder
Set the upper limit of the range. The default is 100.
setMin
@NonNull open fun setMin(min: Int): ListBuilder.InputRangeBuilder
Set the lower limit of the range. The default is 0.
setPrimaryAction
@NonNull open fun setPrimaryAction(@NonNull action: SliceAction): ListBuilder.InputRangeBuilder
Set the primary action for this row.
The action specified here will be sent when the whole row is clicked, whereas the action specified via setInputAction(PendingIntent)
is used when the slider is interacted with. Additionally, 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.InputRangeBuilder
Set the subtitle.
setThumb
@NonNull open fun setThumb(@NonNull thumb: IconCompat): ListBuilder.InputRangeBuilder
Set the Icon
to be displayed as the thumb on the input range.
setTitle
@NonNull open fun setTitle(@NonNull title: CharSequence): ListBuilder.InputRangeBuilder
Set the title.
setValue
@NonNull open fun setValue(value: Int): ListBuilder.InputRangeBuilder
Set the current value of the range.
Parameters | |
---|---|
value |
Int: the value of the range, between setMin(int) and setMax(int) . |