Skip to content

Release 1: phone layouts and light/dark theme - #12

Merged
kefrens merged 11 commits into
ariane-mainfrom
touch/release-1
Oct 9, 2026
Merged

kefrens merged 11 commits into
ariane-mainfrom
touch/release-1

Conversation

@kefrens

@kefrens kefrens commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Phone layouts, light/dark theme, and a choice of how the stream menu opens. TV layouts and behaviour stay untouched. Plan: https://claude.ai/artifact/VMLwFku125vxeAAFBRq5c5

  • M0 Foundation: UiClass device class, layout inflation per device class, layout contract test
  • M1 Light and dark themes (System by default, wallpaper colours in both)
  • M2 Phone Settings: category list, drill-down, search, section chips, back stepping
  • M3 Phone Home and Apps: host rows, bottom-sheet menu
  • M5 Stream menu setting: visible handle, floating button or nothing on screen. The handle and floating button hide while a gamepad is connected. The Interface setting has its row.
  • Tablets: drill-down Settings when held upright, two-pane when wide

Checked on an Android 16 emulator: System theme following the device, wallpaper colours, status bar icons, and a tablet-sized window in both orientations. Found and fixed on the way: white status bar icons on light screens, narrow two-pane Settings on a tablet, and Settings going blank when the window changes size.

Dropped: edge swipe. Parked: tablet master-detail.

🤖 Generated with Claude Code

kefrens and others added 11 commits October 9, 2026 09:06
UiClass decides TV, tablet or phone (with an Interface override) and picks a
layout with a nearest-fallback, so phone and tablet layouts can be added
without touching the TV ones. Layouts are now inflated for phone, tablet and
TV configurations, and a contract test checks that every variant of a screen
keeps the view ids its Java code looks up.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The app theme is now DayNight. values/colors.xml holds a new light palette and
values-night/colors.xml holds the existing dark one, plus tokens for the
literals that assumed a dark background (panel, backdrop scrim, home glow,
dialog highlight, focus ring, section colours). White icons and the profile
screens follow the theme's text colour.

A Theme setting (System, Light, Dark; System by default) sets the night mode
from ArtemisApplication. TVs stay dark under System. The stream and the
external-display controller are pinned dark. Screens other than the stream no
longer handle uiMode themselves, so the system recreates them on a theme
change and they repaint. Dynamic colour is unchanged and now applies to both
themes.

Tests: every layout is inflated in night mode too, with the app's own theme; a
test keeps the light and dark colour files in step; the theme decision is
unit tested.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Changing the theme recreates Settings, and Android then tried to restore the
old SettingsFragment, which has no empty constructor. Settings no longer
restores it, since reloadSettings() builds a fresh one anyway.

The side panel behind list choices (including the new Theme setting) had a
fixed dark background, so its text vanished in light mode. It now uses a
themed colour, as do the chevrons and the category icons that had the dark
theme's colours baked in. Status and navigation bar icons turn dark on light
screens.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A theme change recreates Settings, which used to start again at the top, so
changing the theme twice meant scrolling back down to it. The first visible
item and the selected category are now saved and restored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On a phone, Settings opens on a list of categories with a coloured icon, the
name and the sections inside each one, plus search. Picking a category (or
searching) shows its options under a header with a back arrow, and the
sections become a row of chips that scroll to them. Back steps out of a
search, then from a category to the list, then leaves Settings.

It reuses SettingsSidebar, so search, sections and category handling are the
same code as the TV and tablet two-pane layout, which is unchanged. A new
OnBackPressedCallback covers Android 13+ predictive back. The layout follows
UiClass and is rebuilt when the window moves to another class of device.

Tests: a behaviour test drives the drill-down (list, drill in, back, search,
clear search), and the layout contract covers the new ids.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…scroll

The title bar already names the category on show, so its own header above the
options said it twice. It is now hidden while one category is open, and kept
in search results, where it shows where each match lives.

The row of section chips now slides to keep the highlighted chip in view as
the options scroll.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On a phone, Home lists hosts as rows (icon, name, what a tap does) with the
Add host row last, under a compact top bar. The running game banner stacks
Resume and Quit under the name. Apps gets the same top bar treatment, with an
icon-only Search button so the host name keeps room. Both keep every view id
their screens look up, and the TV and tablet layouts are unchanged.

The long-press menu for a host or app rises from the bottom as a sheet on a
phone, instead of a side panel that does not fit.

The floating menu button is on by default on phones, until the stream has its
own handle. Tablets and TVs keep it off, and anyone who has already chosen a
value keeps it.

Tests: host rows on a phone against cards on tablet and TV, Home and Apps
opening on a phone, and the floating button default for phone, tablet and TV.
The layout contract picks up the new phone layouts by name.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new Stream menu setting replaces the Floating Button switch: a visible
handle, the floating button, or nothing on screen. New installs on phones and
tablets get the handle and TVs get nothing; anyone who had the floating button
on keeps it and everyone else keeps seeing nothing on screen.

The handle is a small tab on the right edge of the stream. Tapping it opens the
menu, and dragging it up or down moves it, with the place remembered. It is its
own view above the video, so a touch on it never reaches the host, and only its
own area is excluded from the system Back gesture. It fades when idle.

The handle and the floating button hide in picture-in-picture, in pan and zoom
mode, and while a gamepad is connected (a switch turns that off), since a
gamepad opens the menu with Start. Gamepads coming and going are followed live.

The Interface setting (Automatic, TV, Touch) now has its row in Settings.

Tests: the handle's tap, drag, limits, remembered place, gesture exclusion and
fade; the preference migration; the per-device default; gamepad detection.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On Android 16 the clock and icons stayed white on a light screen, because the
theme attribute alone was not enough. They are now set in code when each screen
starts, from whether it is in night mode. The stream and the external display
controls are always dark and keep their own.

Found by testing System theme and wallpaper colours on an Android 16 emulator.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ngs going blank on a size change

A tablet about 800dp wide in portrait got the two-pane Settings, which left the
options a narrow column with cut-off titles. Windows narrower than 900dp now use
the drill-down layout that phones use, and the two-pane one returns when the
window is wide.

Changing the window size relaunches Settings, and when Android keeps the old
window it does not call onAttachedToWindow() for the new instance, which is the
only place the settings were loaded from, so the screen stayed empty. They are
now also loaded from onResume when that has not happened.

Found on an Android 16 emulator resized to a tablet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Floating Button switch became the Stream menu setting, so its strings are
gone from the default locale. Russian and both Chinese translations still had
them, and release lint treats an extra translation as fatal, which failed the
release build on the pull request.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kefrens
kefrens marked this pull request as ready for review October 9, 2026 15:22
@kefrens
kefrens merged commit 1d3a8e7 into ariane-main Oct 9, 2026
1 check passed
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