belongs to Maven artifact androidx.slice:slice-builders:1.0.0-alpha1

ListBuilder.InputRangeBuilder

public static class ListBuilder.InputRangeBuilder
extends TemplateSliceBuilder

java.lang.Object
   ↳ androidx.slice.builders.TemplateSliceBuilder
     ↳ 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

ListBuilder.InputRangeBuilder(ListBuilder parent)

Builder to construct a input range row.

Public methods

ListBuilder.InputRangeBuilder setAction(PendingIntent action)

This method is deprecated. TO BE REMOVED; use setInputAction(PendingIntent)

ListBuilder.InputRangeBuilder setContentDescription(CharSequence description)

Sets the content description.

ListBuilder.InputRangeBuilder setInputAction(PendingIntent action)

Set the PendingIntent to send when the current value is updated.

ListBuilder.InputRangeBuilder setMax(int max)

Set the upper limit of the range.

ListBuilder.InputRangeBuilder setMin(int min)

Set the lower limit of the range.

ListBuilder.InputRangeBuilder setPrimaryAction(SliceAction action)

Set the primary action for this row.

ListBuilder.InputRangeBuilder setSubtitle(CharSequence title)

Set the subtitle.

ListBuilder.InputRangeBuilder setThumb(IconCompat thumb)

Set the Icon to be displayed as the thumb on the input range.

ListBuilder.InputRangeBuilder setThumb(Icon thumb)

This method is deprecated. TO BE REMOVED

ListBuilder.InputRangeBuilder setTitle(CharSequence title)

Set the title.

ListBuilder.InputRangeBuilder setValue(int value)

Set the current value of the range.

Inherited methods

Public constructors

ListBuilder.InputRangeBuilder

ListBuilder.InputRangeBuilder (ListBuilder parent)

Builder to construct a input range row.

An input range row supports displaying a horizontal slider allowing slider input.

Parameters
parent ListBuilder

Public methods

setAction

ListBuilder.InputRangeBuilder setAction (PendingIntent action)

This method is deprecated.
TO BE REMOVED; use setInputAction(PendingIntent)

Set the PendingIntent to send when the current value is updated.

Parameters
action PendingIntent

Returns
ListBuilder.InputRangeBuilder

setContentDescription

ListBuilder.InputRangeBuilder setContentDescription (CharSequence description)

Sets the content description.

Parameters
description CharSequence

Returns
ListBuilder.InputRangeBuilder

setInputAction

ListBuilder.InputRangeBuilder setInputAction (PendingIntent action)

Set the PendingIntent to send when the current value is updated.

Parameters
action PendingIntent

Returns
ListBuilder.InputRangeBuilder

setMax

ListBuilder.InputRangeBuilder setMax (int max)

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

Parameters
max int

Returns
ListBuilder.InputRangeBuilder

setMin

ListBuilder.InputRangeBuilder setMin (int min)

Set the lower limit of the range. The default is 0.

Parameters
min int

Returns
ListBuilder.InputRangeBuilder

setPrimaryAction

ListBuilder.InputRangeBuilder setPrimaryAction (SliceAction action)

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 setAction(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 SliceView.MODE_SHORTCUT representation of the slice.

Parameters
action SliceAction

Returns
ListBuilder.InputRangeBuilder

setSubtitle

ListBuilder.InputRangeBuilder setSubtitle (CharSequence title)

Set the subtitle.

Parameters
title CharSequence

Returns
ListBuilder.InputRangeBuilder

setThumb

ListBuilder.InputRangeBuilder setThumb (IconCompat thumb)

Set the Icon to be displayed as the thumb on the input range.

Parameters
thumb IconCompat

Returns
ListBuilder.InputRangeBuilder

setThumb

ListBuilder.InputRangeBuilder setThumb (Icon thumb)

This method is deprecated.
TO BE REMOVED

Parameters
thumb Icon

Returns
ListBuilder.InputRangeBuilder

setTitle

ListBuilder.InputRangeBuilder setTitle (CharSequence title)

Set the title.

Parameters
title CharSequence

Returns
ListBuilder.InputRangeBuilder

setValue

ListBuilder.InputRangeBuilder setValue (int value)

Set the current value of the range.

Parameters
value int

Returns
ListBuilder.InputRangeBuilder