ListBuilder.RatingBuilder

public static final class ListBuilder.RatingBuilder
extends Object

java.lang.Object
   ↳ androidx.slice.builders.ListBuilder.RatingBuilder


Builder to construct a input star rating.

An star rating row supports displaying a horizontal tappable stars allowing rating input.

Summary

Public constructors

RatingBuilder()

Builder to construct a star rating row.

Public methods

ListBuilder.RatingBuilder setContentDescription(CharSequence description)

Sets the content description.

ListBuilder.RatingBuilder setInputAction(RemoteCallback callback)

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

ListBuilder.RatingBuilder setInputAction(PendingIntent action)

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

ListBuilder.RatingBuilder setMax(int max)

Set the upper limit of the range.

ListBuilder.RatingBuilder setMin(int min)

Set the lower limit of the range.

ListBuilder.RatingBuilder setPrimaryAction(SliceAction action)

Set the primary action for this row.

ListBuilder.RatingBuilder setSubtitle(CharSequence title)

Set the subtitle.

ListBuilder.RatingBuilder setTitle(CharSequence title)

Set the title.

ListBuilder.RatingBuilder setTitleItem(IconCompat icon, int imageMode, boolean isLoading)

Sets the title item to be the provided icon.

ListBuilder.RatingBuilder setTitleItem(IconCompat icon, int imageMode)

Sets the title item to be the provided icon.

ListBuilder.RatingBuilder setValue(float value)

Set the current value of the range.

Inherited methods

Public constructors

RatingBuilder

public RatingBuilder ()

Builder to construct a star rating row.

An star rating row supports displaying a horizontal slider allowing slider input.

Public methods

setContentDescription

public ListBuilder.RatingBuilder setContentDescription (CharSequence description)

Sets the content description.

Parameters
description CharSequence

Returns
ListBuilder.RatingBuilder

setInputAction

public ListBuilder.RatingBuilder setInputAction (RemoteCallback callback)

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

Parameters
callback RemoteCallback

Returns
ListBuilder.RatingBuilder

setInputAction

public ListBuilder.RatingBuilder setInputAction (PendingIntent action)

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

Parameters
action PendingIntent

Returns
ListBuilder.RatingBuilder

setMax

public ListBuilder.RatingBuilder setMax (int max)

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

Parameters
max int

Returns
ListBuilder.RatingBuilder

setMin

public ListBuilder.RatingBuilder setMin (int min)

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

Parameters
min int

Returns
ListBuilder.RatingBuilder