[Dynamic Theming Ā· System Integration Ā· UI] ā Dawn & Dusk Theme Transition
textpost Ā· published
Attachments
š Scenario
You wake up at dawn (or is it dusk?) to discover the amazing sample app you wrote over the weekend to test your Jetpack Compose skills doesnāt respond to the deviceās light/dark mode changesāitās stuck on bright white! In a coffee-fueled haze, youāre determined to fix this. When the deviceās theme switches, you want the UI to morph seamlessly from a warm, sunrise-like screen to a cool, moonlit scene. You canāt rely on local state alone; this must truly respond to the deviceās settings.
šÆ Feature Goal
Create a full-screen UI that automatically switches between dawn and dusk visuals based on the deviceās theme (light or dark).
š Requirements
The UI must switch automatically whenever the user changes the system (device) theme.
You can find the mockups in the attachments section šš¼
Light Mode (Dawn)
Use a warm blue background gradient
Show and place the sun graphic near the top-left corner of the screen
The moon graphic should not be visibile
Show UI component to rate the user's day in its light color scheme
The component does not need functionality for this challenge. However, adding functionality to choose a rating between 1 and 5 āstars is encouraged.
Dark Mode (Dusk)
Use a cool dark background gradient
Show and place the moon graphic near the top-right corner of the screen
The sun graphic should not be visible
Show UI component to rate the user's day in its dark color scheme
š¤ What's Allowed?
Standard Android/Jetpack libraries
No 3rd party libraries are allowed or would be required to complete this challenge
ā ļø What's NOT important for a valid submission?
The "How was your day" rating component does not need functionality - it can display a hardcoded amount of stars
The animation of the sun and moon that can be observed in the mockups - let's keep our space rocks stationary for this challenge.
Perfect recreation of the mockup - it just needs to reasonably resemble the mockups
Responsiveness across every device size or orientation is not mandatory, you're welcome to hardcode offset values for sun and moon.
š§ Disclaimer
Just focus on capturing that day-to-night vibe. There's no need to sweat every edge case or color code; detect system theme changes and shift from dawn to dusk. If you want to add extra sparkle or animations, go for itābut the main idea is to have fun showcasing dynamic theming!
š Submission & Rewards
A successful submission of this challenge via the
/submit-challengecommand on Discord grants you 100 XP. You can use it in any channel on Discord :)A successful submission consists of these parts
A link to a Gist showing your code for this challenge.
A screen recording (10s max) that shows you changing the device theme and then returning to the app to observe the changed color scheme. Do this twice, i.e. toggle back to the previous mode.