public class

ListBuilder.InputRangeBuilder

extends java.lang.Object

 java.lang.Object

↳androidx.slice.builders.ListBuilder.InputRangeBuilder

Overview

Builder to construct a input range row.

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

Summary

Fields
public static final intTYPE_ACTION

Constructors
publicInputRangeBuilder()

Builder to construct a input range row.

Methods
public ListBuilder.InputRangeBuilderaddEndItem(SliceAction action)

Adds an action to the end items of the input range builder.

public ListBuilder.InputRangeBuilderaddEndItem(SliceAction action, boolean isLoading)

Adds an action to the end items of the input range builder.

public PendingIntentgetAction()

public java.lang.CharSequencegetContentDescription()

public java.util.List<java.lang.Object>getEndItems()

public java.util.List<java.lang.Boolean>getEndLoads()

public java.util.List<java.lang.Integer>getEndTypes()

public PendingIntentgetInputAction()

public intgetLayoutDirection()

public intgetMax()

public intgetMin()

public SliceActiongetPrimaryAction()

public java.lang.CharSequencegetSubtitle()

public IconCompatgetThumb()

public java.lang.CharSequencegetTitle()

public IconCompatgetTitleIcon()

public intgetTitleImageMode()

public intgetValue()

public booleanisTitleItemLoading()

public booleanisValueSet()

public ListBuilder.InputRangeBuildersetContentDescription(java.lang.CharSequence description)

Sets the content description.

public ListBuilder.InputRangeBuildersetInputAction(PendingIntent action)

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

public ListBuilder.InputRangeBuildersetLayoutDirection(int layoutDirection)

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

public ListBuilder.InputRangeBuildersetMax(int max)

Set the upper limit of the range.

public ListBuilder.InputRangeBuildersetMin(int min)

Set the lower limit of the range.

public ListBuilder.InputRangeBuildersetPrimaryAction(SliceAction action)

Set the primary action for this row.

public ListBuilder.InputRangeBuildersetSubtitle(java.lang.CharSequence title)

Set the subtitle.

public ListBuilder.InputRangeBuildersetThumb(IconCompat thumb)

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

public ListBuilder.InputRangeBuildersetTitle(java.lang.CharSequence title)

Set the title.

public ListBuilder.InputRangeBuildersetTitleItem(IconCompat icon, int imageMode)

Sets the title item to be the provided icon.

public ListBuilder.InputRangeBuildersetTitleItem(IconCompat icon, int imageMode, boolean isLoading)

Sets the title item to be the provided icon.

public ListBuilder.InputRangeBuildersetValue(int value)

Set the current value of the range.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int TYPE_ACTION

Constructors

public InputRangeBuilder()

Builder to construct a input range row.

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

See also: ListBuilder.addInputRange(ListBuilder.InputRangeBuilder)

Methods

public ListBuilder.InputRangeBuilder setTitleItem(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.

Parameters:

icon: the image to display.
imageMode: the mode that image should be displayed in.

See also: ListBuilder.ICON_IMAGE, ListBuilder.SMALL_IMAGE, ListBuilder.LARGE_IMAGE

public ListBuilder.InputRangeBuilder addEndItem(SliceAction action)

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 java.lang.IllegalStateException.

public ListBuilder.InputRangeBuilder addEndItem(SliceAction action, boolean isLoading)

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 java.lang.IllegalStateException.

Use this method to specify content that will appear in the template once it's been loaded.

Parameters:

isLoading: indicates whether the app is doing work to load the added content in the background or not.

public ListBuilder.InputRangeBuilder setTitleItem(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.

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:

icon: the image to display.
imageMode: the mode that image should be displayed in.
isLoading: whether this content is being loaded in the background.

See also: ListBuilder.ICON_IMAGE, ListBuilder.SMALL_IMAGE, ListBuilder.LARGE_IMAGE

public ListBuilder.InputRangeBuilder setMin(int min)

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

public ListBuilder.InputRangeBuilder setMax(int max)

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

public ListBuilder.InputRangeBuilder setValue(int value)

Set the current value of the range.

Parameters:

value: the value of the range, between ListBuilder.InputRangeBuilder.setMin(int) and ListBuilder.InputRangeBuilder.setMax(int).

public ListBuilder.InputRangeBuilder setTitle(java.lang.CharSequence title)

Set the title.

public ListBuilder.InputRangeBuilder setSubtitle(java.lang.CharSequence title)

Set the subtitle.

public ListBuilder.InputRangeBuilder setInputAction(PendingIntent action)

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

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

public 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 ListBuilder.InputRangeBuilder.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 SliceView.MODE_SHORTCUT representation of the slice.

public ListBuilder.InputRangeBuilder setContentDescription(java.lang.CharSequence description)

Sets the content description.

public ListBuilder.InputRangeBuilder setLayoutDirection(int layoutDirection)

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

Parameters:

layoutDirection: the layout direction to set.

public boolean isTitleItemLoading()

public int getTitleImageMode()

public IconCompat getTitleIcon()

public java.util.List<java.lang.Object> getEndItems()

public java.util.List<java.lang.Integer> getEndTypes()

public java.util.List<java.lang.Boolean> getEndLoads()

public int getMin()

public int getMax()

public int getValue()

public boolean isValueSet()

public java.lang.CharSequence getTitle()

public java.lang.CharSequence getSubtitle()

public PendingIntent getAction()

public PendingIntent getInputAction()

public IconCompat getThumb()

public SliceAction getPrimaryAction()

public java.lang.CharSequence getContentDescription()

public int getLayoutDirection()