YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.browser.ChoiceSheet Class Reference

A short list to pick one entry from, as a bottom sheet in the look of the other sheets of the app (the device sheet, the Snapcast group sheet): a title and rows with a text and an optional second line. More...

Collaboration diagram for de.yaacc.browser.ChoiceSheet:
Collaboration graph

Classes

class  Choice
 One entry: the title and an optional second line.
 

Static Public Member Functions

static BottomSheetDialog show (Context context, CharSequence title, List< Choice > choices, final IntConsumer onChosen)
 Shows the sheet.
 

Detailed Description

A short list to pick one entry from, as a bottom sheet in the look of the other sheets of the app (the device sheet, the Snapcast group sheet): a title and rows with a text and an optional second line.

It replaces the plain AlertDialog#setItems list, whose rows are one line of stock text. The texts are plain text (a name from the network is cleaned by the caller). Thin Android glue: the words of a row are describe and hasSubtitle, tested on the JVM.

Member Function Documentation

◆ show()

static BottomSheetDialog de.yaacc.browser.ChoiceSheet.show ( Context context,
CharSequence title,
List< Choice > choices,
final IntConsumer onChosen )
static

Shows the sheet.

The sheet ends with the choice; swiping it away or the back key chooses nothing.

Parameters
onChosengets the position of the chosen entry in choices
Returns
the dialog (to dismiss it with the screen)

The documentation for this class was generated from the following file: