public class SelectionBuilder
extends Object


Builder to construct a selection which can be added to a ListBuilder. A selection presents a list of options to the user and allows the user to select exactly one option.


Public constructors


Creates a SelectionBuilder with no options.

Public methods

SelectionBuilder addOption(String optionKey, CharSequence optionText)

Adds an option to this SelectionBuilder.

SelectionBuilder setContentDescription(CharSequence contentDescription)

Sets the content description.

SelectionBuilder setInputAction(RemoteCallback inputAction)

Sets the RemoteCallback to send when the selection is made or changed.

SelectionBuilder setInputAction(PendingIntent inputAction)

Sets the PendingIntent to send when the selection is made or changed.

SelectionBuilder setLayoutDirection(int layoutDirection)

Sets the layout direction.

SelectionBuilder setPrimaryAction(SliceAction primaryAction)

Sets the primary action for the selection slice.

SelectionBuilder setSelectedOption(String selectedOption)

Sets which option is selected by default.

SelectionBuilder setSubtitle(CharSequence subtitle)

Sets the subtitle.

SelectionBuilder setTitle(CharSequence title)

Sets the title.

Inherited methods