Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.slice:slice-builders:1.0.0-rc01

ListBuilder.RangeBuilder

public static class ListBuilder.RangeBuilder
extends Object

java.lang.Object
   ↳ 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()

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 setLayoutDirection(int layoutDirection)

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

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

added in version 1.0.0
public ListBuilder.RangeBuilder ()

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

A range row supports displaying a horizontal progress indicator.

Public methods

setContentDescription

added in version 1.0.0
public ListBuilder.RangeBuilder setContentDescription (CharSequence description)

Sets the content description.

Parameters
description CharSequence

Returns
ListBuilder.RangeBuilder

setLayoutDirection

added in version 1.0.0
public ListBuilder.RangeBuilder setLayoutDirection (int layoutDirection)

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

Parameters
layoutDirection int: the layout direction to set.

Returns
ListBuilder.RangeBuilder

setMax

added in version 1.0.0
public ListBuilder.RangeBuilder setMax (int max)

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

Parameters
max int

Returns
ListBuilder.RangeBuilder

setPrimaryAction

added in version 1.0.0
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.

Parameters
action SliceAction

Returns
ListBuilder.RangeBuilder

setSubtitle

added in version 1.0.0
public ListBuilder.RangeBuilder setSubtitle (CharSequence title)

Set the subtitle.

Parameters
title CharSequence

Returns
ListBuilder.RangeBuilder

setTitle

added in version 1.0.0
public ListBuilder.RangeBuilder setTitle (CharSequence title)

Set the title.

Parameters
title CharSequence

Returns
ListBuilder.RangeBuilder

setValue

added in version 1.0.0
public ListBuilder.RangeBuilder setValue (int value)

Set the current value of the range.

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

Returns
ListBuilder.RangeBuilder