Skip to content

feature: weather and location text labels on the wallpaper#14

Merged
Attacktive merged 3 commits into
mainfrom
feature/weather-location-labels
Jul 15, 2026
Merged

feature: weather and location text labels on the wallpaper#14
Attacktive merged 3 commits into
mainfrom
feature/weather-location-labels

Conversation

@Attacktive

Copy link
Copy Markdown
Owner

Draws an optional text overlay on the wallpaper: the current condition with the temperature, and the place name beneath it.

What you get

  • Weather linePartly cloudy · 26°, from a new WMO-code → label table (weatherLabelFor) plus the temperature already in every snapshot. Unknown code → the bare temperature, no invented text.
  • Location lineSeoul, South Korea, smaller and dimmer below it. Manual mode reuses the city label you picked; device mode reverse-geocodes the fix through the platform Geocoder (no new dependency, no API key, no extra permission), cached per fix. A failed lookup hides only that line and retries next refresh.
  • Three settings in a new "Labels" section: show weather (default on), show location (default off), and a °C/°F segmented choice that appears only while the weather line is on.

Placement

Top of the sky, just under the status bar, drawn last so no weather obscures it.

The first attempt put it bottom-center, which was wrong twice over and both were caught on-device: the scenery's silhouettes are the busiest part of the frame rather than a clean backdrop for text, and a launcher's dock plus the lock screen's shortcuts own a whole band down there, not just the bottom edge — the location line ended up behind the dock icons. The top band is the only region free of the dock, the shortcuts, the fingerprint sensor and the silhouettes. The sun/moon shares it, so the text keeps a shadow and draws over.

Plumbing

SceneParams gains overlayLabels: OverlayLabels? (null = no text pass at all). WeatherSceneProvider captures the three settings before the refresh throttle — same pattern as backdropScene; they're display choices, not weather, so toggling them applies without waiting out the interval. The debug scene cycler leaves labels off, so a fake thunderstorm never gets labelled "Clear sky".

Also rewords the one comment in the repo that assumed this wallpaper only lives on the lock screen — it serves the home screen just as well.

Testing

TDD throughout, red verified before every implementation. 61 tests, 0 failures (./gradlew :app:testDebugUnitTest --rerun). New coverage: the WMO label table + unknown codes; Celsius/Fahrenheit conversion, rounding and unknown-unit fallback; settings round-trip; and nine provider tests — labels reach the params, unknown-code fallback, both toggles off → no overlay, manual label used without geocoding, device fix geocoded, failed geocode hides only the location, geocode cached per fix, unit change applies mid-throttle, and enabling the location label mid-interval geocodes the cached fix without refetching weather.

Verified on the emulator across the Beach, Metropolis and Mountains sceneries.

🤖 Generated with Claude Code

Attacktive and others added 2 commits July 15, 2026 12:02
The renderer draws an optional two-line overlay above everything else: the current condition with the temperature ("Rain · 10°") and the place name beneath it, bottom-center where the near scenery plane lends contrast. Three new settings drive it — show weather (default on), show location (default off), and a °C/°F choice. The place name reuses the manual city label, or a platform-Geocoder reverse lookup in device-location mode, cached per fix; label settings are captured before the refresh throttle so toggling them applies without waiting out the interval.

Also rewords the one comment that assumed the wallpaper lives on the lock screen — it serves the home screen just as well.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bottom-center was wrong on both counts: the scenery's silhouettes are the busiest part of the frame rather than a clean backdrop for text, and below them a launcher's dock and the lock screen's shortcuts own a whole band, not just the very bottom edge — the location line landed behind the dock icons. The top of the sky is the only region free of all of it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 74 complexity · 6 duplication

Metric Results
Complexity 74
Duplication 6

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

The overlay can sit under whatever a launcher or lock screen decides to draw, so it must be opt-in: both toggles now default to off and the labels appear only when the user asks for them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Attacktive Attacktive merged commit 7c4b567 into main Jul 15, 2026
5 of 6 checks passed
@Attacktive Attacktive deleted the feature/weather-location-labels branch July 15, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant