|
YAACC - UPNP Client and Server
|
What a tap on the toolbar shutdown-timer item does. More...

Classes | |
| enum | Action |
| The step to take. More... | |
Static Public Member Functions | |
| static Action | decide (boolean running) |
| One toolbar icon does it all: a running timer is stopped by a tap, otherwise the duration picker opens and confirming it starts the timer. | |
| static String | subtitle (String name, String remaining, boolean running) |
| The text under the title of the toolbar while a timer runs. | |
What a tap on the toolbar shutdown-timer item does.
Plain Java so the rule is testable.
Starting a timer with a duration of 0 would exit the app at once, so without a configured duration the tap asks for one instead.
|
static |
One toolbar icon does it all: a running timer is stopped by a tap, otherwise the duration picker opens and confirming it starts the timer.
Starting straight from a stored duration is not offered, so a tap can never start (or, with 0, immediately fire) a timer unseen.
| running | a timer is counting down |
|
static |
The text under the title of the toolbar while a timer runs.
The action item cannot carry the remaining time: the toolbar drops the text of an action with an icon on narrow screens (portrait phones), so the time is shown as the subtitle, which is always shown.
| name | the name of the timer, e.g. "Shutdown timer" |
| remaining | the remaining time, already formatted |
| running | a timer is counting down |