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

Bottom sheet listing every receiver with its device controls and, under each, the yaacc players running on it (spec 2026-10-23-unified-device-sheet). More...

Inheritance diagram for de.yaacc.browser.DeviceSheetFragment:
Inheritance graph
Collaboration diagram for de.yaacc.browser.DeviceSheetFragment:
Collaboration graph

Public Member Functions

int getTheme ()
 AppTheme sets no bottomSheetDialogTheme, so the default would be the light Theme.Design dialog theme even in night mode.
 
View onCreateView (@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
 
void onViewCreated (@NonNull View view, @Nullable Bundle savedInstanceState)
 
void onDismiss (@NonNull DialogInterface dialog)
 
void onStart ()
 
void onStop ()
 
void onDestroyView ()
 

Static Public Member Functions

static void show (FragmentManager fragmentManager)
 Shows the normal sheet unless it (or the picker) is already showing or the state is saved (a commit then would throw).
 
static boolean showPicker (FragmentManager fragmentManager, String requestKey, String pickId, boolean forShare, String shareName, Collection< String > initialIds)
 Shows the receiver picker unless one is already showing or the state is saved.
 
static boolean isPickerShowing (FragmentManager fragmentManager)
 Whether a picker is showing (or being restored).
 
static void dismissNormal (FragmentManager fragmentManager)
 Closes the normal sheet if it is showing (a pick takes over).
 
static void dismissPicker (FragmentManager fragmentManager)
 Closes the picker if it is showing.
 

Static Public Attributes

static final String TAG = "DeviceSheetFragment"
 
static final String TAG_PICK = "DeviceSheetPicker"
 Tag of the picker: separate from TAG, so the host can tell the two apart.
 

Detailed Description

Bottom sheet listing every receiver with its device controls and, under each, the yaacc players running on it (spec 2026-10-23-unified-device-sheet).

While started (visible) it is subscribed to the shared RendererStatusMonitor, to player add/remove events, to the system volume (the volume and mute of every row follow ReceiverVolumeLiveUpdater) and to a 2 s poll; all of them are dropped in onStop() (and in onDestroyView() as a backstop), and callbacks that still arrive afterwards are ignored. An in-app dialog only: nothing is exported and it is opened only through show(FragmentManager) or showPicker. See docs/tech.md, "Unified device sheet", for the Material API details.

Pick mode (showPicker, "Play on..."): the receiver picker of the new layout (and of a shared file in classic). Receivers with checkboxes, a confirm and a cancel button; no controls, no sessions, no status polling. The ticks are the adapter's own set, never the stored receiver selection, so a cancel changes nothing. The answer is delivered once through FragmentManager#setFragmentResult: a confirm with the ticked ids when the confirm button is pressed with at least one receiver (with none, a hint is shown and the sheet stays open), a cancel from onDismiss for every other way of closing (PickSheetResult makes double delivery impossible). A restored sheet whose pick is gone (the host lost it) closes itself without an answer.

Member Function Documentation

◆ dismissNormal()

static void de.yaacc.browser.DeviceSheetFragment.dismissNormal ( FragmentManager fragmentManager)
static

Closes the normal sheet if it is showing (a pick takes over).

Never throws for a saved state.

◆ dismissPicker()

static void de.yaacc.browser.DeviceSheetFragment.dismissPicker ( FragmentManager fragmentManager)
static

Closes the picker if it is showing.

Its cancel answer, if still wanted, is sent from onDismiss.

◆ getTheme()

int de.yaacc.browser.DeviceSheetFragment.getTheme ( )

AppTheme sets no bottomSheetDialogTheme, so the default would be the light Theme.Design dialog theme even in night mode.

The overlay keeps AppTheme's DayNight colors.

◆ showPicker()

static boolean de.yaacc.browser.DeviceSheetFragment.showPicker ( FragmentManager fragmentManager,
String requestKey,
String pickId,
boolean forShare,
String shareName,
Collection< String > initialIds )
static

Shows the receiver picker unless one is already showing or the state is saved.

Parameters
requestKeythe key the result is sent under (FragmentManager#setFragmentResult)
pickIdreported back in the result so the host can tell a stale answer apart
forSharetrue if the pick is for a pending share (shows its name)
shareNamethe cleaned name of the shared item, may be null or empty (a fixed text is shown)
initialIdsreceivers that start ticked, may be null
Returns
false if the picker could not be shown
Here is the call graph for this function:

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