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

ListBuilder.RangeBuilder

public static class ListBuilder.RangeBuilder
extends TemplateSliceBuilder

java.lang.Object
   ↳ androidx.slice.builders.TemplateSliceBuilder
     ↳ androidx.slice.builders.ListBuilder.RangeBuilder


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

A range row supports displaying a horizontal progress indicator.

Summary

Public constructors

ListBuilder.RangeBuilder(ListBuilder parent)

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

Public methods

ListBuilder.RangeBuilder setContentDescription(CharSequence description)

Sets the content description.

ListBuilder.RangeBuilder setMax(int max)

Set the upper limit of the range.

ListBuilder.RangeBuilder setPrimaryAction(SliceAction action)

Set the primary action for this row.

ListBuilder.RangeBuilder setSubtitle(CharSequence title)

Set the subtitle.

ListBuilder.RangeBuilder setTitle(CharSequence title)

Set the title.

ListBuilder.RangeBuilder setValue(int value)

Set the current value of the range.

Inherited methods

Public constructors

ListBuilder.RangeBuilder

ListBuilder.RangeBuilder (ListBuilder parent)

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

A range row supports displaying a horizontal progress indicator.

Parameters
parent ListBuilder

Public methods

setContentDescription

ListBuilder.RangeBuilder setContentDescription (CharSequence description)

Sets the content description.

Parameters
description CharSequence

Returns
ListBuilder.RangeBuilder

setMax

ListBuilder.RangeBuilder setMax (int max)

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

Parameters
max int

Returns
ListBuilder.RangeBuilder

setPrimaryAction

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.

Parameters
action SliceAction

Returns
ListBuilder.RangeBuilder

setSubtitle

ListBuilder.RangeBuilder setSubtitle (CharSequence title)

Set the subtitle.

Parameters
title CharSequence

Returns
ListBuilder.RangeBuilder

setTitle

ListBuilder.RangeBuilder setTitle (CharSequence title)

Set the title.

Parameters
title CharSequence

Returns
ListBuilder.RangeBuilder

setValue

ListBuilder.RangeBuilder setValue (int value)

Set the current value of the range.

Parameters
value int

Returns
ListBuilder.RangeBuilder