Menu

1 / 2

Tasks on an Android Home screen: store the day, not the instant, and don't trust delay() to find midnight

DEV Community: kotlin·ReClaim·3 days ago
#4jp76IXy
#devtokotlin#devto#dev#home#tasks
Reading 0:00
15s threshold

We're building ReClaim , a minimalist Android launcher that's on Google Play . Under the clock on its Home screen sits a short to-do list: three open tasks by default, a "2 more" line if there are others, and a tap target to add one. It's the only thing on Home that you type into yourself, so we wanted it to feel like a sticky note and not like a project manager.

A to-do list sounds like the easiest feature in the app. It's a Room table with a title and a checkbox. Most of the work turned out to be about one question: what day is it? Due dates, "Today" and "Tomorrow" labels, a "due soon" filter and an auto-clear for finished tasks all depend on the answer. On a launcher, the answer has to stay right on a screen that may sit open for days.

Stack: Kotlin, Jetpack Compose, Hilt, Room 2.6, DataStore, kotlinx.coroutines 1.9, minSdk 26 . Snippets are trimmed from the real code; // ... marks cuts. The last post covered how the same task list stays readable over the wallpaper.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.