public class

ListBuilder.RangeBuilder

extends java.lang.Object

 java.lang.Object

↳androidx.slice.builders.ListBuilder.RangeBuilder

Overview

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

A range row supports displaying a horizontal progress indicator.

Summary

Constructors
publicRangeBuilder()

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

Methods
public java.lang.CharSequencegetContentDescription()

public intgetLayoutDirection()

public intgetMax()

public intgetMode()

public SliceActiongetPrimaryAction()

public java.lang.CharSequencegetSubtitle()

public java.lang.CharSequencegetTitle()

public IconCompatgetTitleIcon()

public intgetTitleImageMode()

public intgetValue()

public booleanisTitleItemLoading()

public booleanisValueSet()

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

Sets the content description.

public ListBuilder.RangeBuildersetLayoutDirection(int layoutDirection)

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

public ListBuilder.RangeBuildersetMax(int max)

Set the upper limit of the range.

public ListBuilder.RangeBuildersetMode(int mode)

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

public ListBuilder.RangeBuildersetPrimaryAction(SliceAction action)

Set the primary action for this row.

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

Set the subtitle.

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

Set the title.

public ListBuilder.RangeBuildersetTitleItem(IconCompat icon, int imageMode)

Sets the title item to be the provided icon.

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

Sets the title item to be the provided icon.

public ListBuilder.RangeBuildersetValue(int value)

Set the current value of the range.

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

Constructors

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

See also: ListBuilder.addRange(ListBuilder.RangeBuilder)

Methods

public ListBuilder.RangeBuilder 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 using this method or its overload ListBuilder.RangeBuilder.setTitleItem(IconCompat, int, boolean).

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.RangeBuilder 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 using this method or its overload ListBuilder.RangeBuilder.setTitleItem(IconCompat, int).

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.RangeBuilder setMax(int max)

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

public ListBuilder.RangeBuilder setValue(int value)

Set the current value of the range.

Parameters:

value: the value of the range, between 0 and ListBuilder.RangeBuilder.setMax(int).

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

Set the title.

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

Set the subtitle.

public ListBuilder.RangeBuilder setPrimaryAction(SliceAction action)

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

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

Sets the content description.

public ListBuilder.RangeBuilder setLayoutDirection(int layoutDirection)

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

Parameters:

layoutDirection: the layout direction to set.

public ListBuilder.RangeBuilder setMode(int mode)

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

Parameters:

mode: the mode that progress bar should represent progress.

See also: ListBuilder.RANGE_MODE_DETERMINATE, ListBuilder.RANGE_MODE_INDETERMINATE

public boolean isTitleItemLoading()

public int getTitleImageMode()

public IconCompat getTitleIcon()

public int getValue()

public int getMax()

public boolean isValueSet()

public java.lang.CharSequence getTitle()

public java.lang.CharSequence getSubtitle()

public SliceAction getPrimaryAction()

public java.lang.CharSequence getContentDescription()

public int getLayoutDirection()

public int getMode()