ListBuilder.InputRangeBuilder |
addEndItem(@NonNull action: SliceAction)
Adds an action to the end items of the input range builder. Only one non-custom toggle can be added. If a non-custom toggle has already been added, this will throw IllegalStateException .
|
ListBuilder.InputRangeBuilder |
addEndItem(@NonNull action: SliceAction, isLoading: Boolean)
Adds an action to the end items of the input range builder. Only one non-custom toggle can be added. If a non-custom toggle has already been added, this will throw IllegalStateException .
Use this method to specify content that will appear in the template once it's been loaded.
|
ListBuilder.InputRangeBuilder |
setContentDescription(@NonNull description: CharSequence)
Sets the content description.
|
ListBuilder.InputRangeBuilder |
setInputAction(@NonNull action: PendingIntent)
Set the PendingIntent to send when the current value is updated.
|
ListBuilder.InputRangeBuilder |
setInputAction(@NonNull callback: RemoteCallback)
Set the PendingIntent to send when the current value is updated.
|
ListBuilder.InputRangeBuilder |
setLayoutDirection(layoutDirection: Int)
Sets the desired layout direction for the content in this row.
|
ListBuilder.InputRangeBuilder |
setMax(max: Int)
Set the upper limit of the range. The default is 100.
|
ListBuilder.InputRangeBuilder |
setMin(min: Int)
Set the lower limit of the range. The default is 0.
|
ListBuilder.InputRangeBuilder |
setPrimaryAction(@NonNull action: SliceAction)
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.
|
ListBuilder.InputRangeBuilder |
setSubtitle(@NonNull title: CharSequence)
Set the subtitle.
|
ListBuilder.InputRangeBuilder |
setThumb(@NonNull thumb: IconCompat)
Set the Icon to be displayed as the thumb on the input range.
|
ListBuilder.InputRangeBuilder |
setTitle(@NonNull title: CharSequence)
Set the title.
|
ListBuilder.InputRangeBuilder |
setTitleItem(@NonNull icon: IconCompat, imageMode: Int)
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.
|
ListBuilder.InputRangeBuilder |
setTitleItem(@NonNull icon: IconCompat, imageMode: Int, isLoading: Boolean)
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.
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.
|
ListBuilder.InputRangeBuilder |
setValue(value: Int)
Set the current value of the range.
|