diff --git a/README.md b/README.md index 2c5b099..ffca956 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,28 @@ ## :scroll: Description -TODO +This app lists timers to launch at will for different needs. +Each unit has its own indicator (for hours, minutes and seconds). ## :bulb: Motivation and Context -TODO +The main idea was to bring a really visual way to represent time, using distinct progress for each units with its own nested color circles. +It was tough to deal with time arithmetic and smooth animation each seconds. + +I'm kind of satisfied by final visual even if not perfect. +I learn a lot with this challenge #2 (Animation, backdrop (incl. conceal/reveal using `rememberCoroutineScope`), time arithmetic, canvas composable, custom font, `LazyColumn.stickyHeader`). ## :camera_flash: Screenshots -## 🌞 Light Mode -List | Details | Tablet ---- | --- | --- | - | | +### 🌞 Light Mode +Active timer | Timers +--- | --- | + | -## 🌚 Dark Mode -List | Details | Tablet ---- | --- | --- | - | | +### 🌚 Dark Mode +Active timer | Timers +--- | --- | + | ## License ``` diff --git a/app/src/main/java/net/opatry/countdowntimer/CounterViewModel.kt b/app/src/main/java/net/opatry/countdowntimer/CounterViewModel.kt index e7d36df..86b760a 100644 --- a/app/src/main/java/net/opatry/countdowntimer/CounterViewModel.kt +++ b/app/src/main/java/net/opatry/countdowntimer/CounterViewModel.kt @@ -85,8 +85,6 @@ class CounterViewModel(private val mainDispatcher: CoroutineDispatcher = Dispatc fun start(timer: Timer) { viewModelScope.launch(mainDispatcher) { - // TODO review poor state & timers modeling - // keep list of timers up to date keeping last used first _timers.value = buildList { add(timer) val timers = _timers.value?.filterNot { it == timer } diff --git a/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerCircle.kt b/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerCircle.kt index 1837615..77ed141 100644 --- a/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerCircle.kt +++ b/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerCircle.kt @@ -65,7 +65,6 @@ fun TimerCircle( tickInterval: Duration, onFABClicked: () -> Unit ) { - // TODO animate card size when reaching 0 to make it wrapping the FAB Card( Modifier .padding(16.dp) diff --git a/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerLabel.kt b/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerLabel.kt index 2ac380d..095168e 100644 --- a/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerLabel.kt +++ b/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerLabel.kt @@ -44,8 +44,6 @@ fun TimerLabel(hours: Int, minutes: Int, seconds: Int) { Text( // FIXME text "moves" because it's not a monospaced font, how could we make each "bucket" of 2-digits stable in size? buildAnnotatedString { - // TODO padded string 2 digits, pad number with alpha - // TODO transition anim alpha of pad number when changing from 0 to N or N to 0 withStyle(style = SpanStyle(color = DurationUnit.HOURS.color)) { append(hours.pad0()) } diff --git a/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerList.kt b/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerList.kt index 781f828..a24f5d1 100644 --- a/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerList.kt +++ b/app/src/main/java/net/opatry/countdowntimer/ui/component/TimerList.kt @@ -110,7 +110,6 @@ fun TimerListItem(timer: Timer, onTimerClicked: (Timer) -> Unit) { Text( buildAnnotatedString { - // FIXME shouldn't come from string resource for proper localization? if (timer.name != null) { append(timer.name) } else { diff --git a/results/screenshot_1.png b/results/screenshot_1.png index 8df1d25..a5df400 100644 Binary files a/results/screenshot_1.png and b/results/screenshot_1.png differ diff --git a/results/screenshot_1_dark.png b/results/screenshot_1_dark.png new file mode 100644 index 0000000..206d833 Binary files /dev/null and b/results/screenshot_1_dark.png differ diff --git a/results/screenshot_2.png b/results/screenshot_2.png index 8df1d25..378c338 100644 Binary files a/results/screenshot_2.png and b/results/screenshot_2.png differ diff --git a/results/screenshot_2_dark.png b/results/screenshot_2_dark.png new file mode 100644 index 0000000..1e67373 Binary files /dev/null and b/results/screenshot_2_dark.png differ diff --git a/results/video.mp4 b/results/video.mp4 index f4b0414..49b7216 100644 Binary files a/results/video.mp4 and b/results/video.mp4 differ