YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.player.PlayModeControls Class Reference

The repeat and shuffle controls of the player screens: which icon and text show a play mode, and the binding of two buttons to a Player. More...

Collaboration diagram for de.yaacc.player.PlayModeControls:
Collaboration graph

Classes

class  Binding
 Binds a repeat and a shuffle button to a player: shows its play mode, changes it on a click (repeat cycles off, all, one) and follows changes from outside (a controller that sets the play mode).
 

Static Public Member Functions

static int repeatIcon (PlayMode.RepeatMode repeat)
 
static int repeatLabel (PlayMode.RepeatMode repeat)
 
static int shuffleIcon ()
 
static int shuffleLabel (boolean shuffle)
 
static float alpha (boolean active)
 
static void renderRepeat (Context context, MenuItem item, PlayMode mode)
 Shows the repeat state of the mode as icon, title and (half transparent when off) alpha of a menu item.
 
static void renderShuffle (Context context, MenuItem item, PlayMode mode)
 Shows the shuffle state of the mode as icon, title and alpha of a menu item.
 

Detailed Description

The repeat and shuffle controls of the player screens: which icon and text show a play mode, and the binding of two buttons to a Player.

The state must be readable without color (the app is gray): repeat one has its own icon ("1"), and an inactive control (repeat off, shuffle off) is drawn half transparent; the content description says the state in words for a screen reader.

Member Function Documentation

◆ alpha()

static float de.yaacc.player.PlayModeControls.alpha ( boolean active)
static
Returns
1 for an active control (repeat all or one, shuffle on), 0.5 for an inactive one

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