show a toast at stopping timer or stopwatch if it is running at onDestroy
This commit is contained in:
parent
b771f05881
commit
5878af2cc5
|
@ -100,6 +100,9 @@ class StopwatchFragment : Fragment() {
|
|||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
if (isRunning) {
|
||||
context?.toast(R.string.stopwatch_stopped)
|
||||
}
|
||||
isRunning = false
|
||||
updateHandler.removeCallbacks(updateRunnable)
|
||||
}
|
||||
|
|
|
@ -69,6 +69,9 @@ class TimerFragment : Fragment() {
|
|||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
if (isRunning) {
|
||||
context?.toast(R.string.timer_stopped)
|
||||
}
|
||||
isRunning = false
|
||||
updateHandler.removeCallbacks(updateRunnable)
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<string name="no_days_selected">No days selected</string>
|
||||
<string name="alarm">Alarm</string>
|
||||
<string name="lap">Lap</string>
|
||||
<string name="stopwatch_stopped">Stopwatch has been stopped</string>
|
||||
<string name="timer_stopped">Timer has been stopped</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="clock_tab">Relógio</string>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<string name="no_days_selected">Neboli označené žiadne dni</string>
|
||||
<string name="alarm">Budík</string>
|
||||
<string name="lap">Okruh</string>
|
||||
<string name="stopwatch_stopped">Stopky boli zastavené</string>
|
||||
<string name="timer_stopped">Časovač bol zastavený</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="clock_tab">Okno s časom</string>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<string name="no_days_selected">No days selected</string>
|
||||
<string name="alarm">Alarm</string>
|
||||
<string name="lap">Lap</string>
|
||||
<string name="stopwatch_stopped">Stopwatch has been stopped</string>
|
||||
<string name="timer_stopped">Timer has been stopped</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="clock_tab">Clock tab</string>
|
||||
|
|
Loading…
Reference in New Issue