Skip to content

Lift the focused tile and show its app's name: two new tile options - #2

Merged
CVasilakis merged 5 commits into
CVasilakis:betafrom
VadymMelnychuk:tvos-tiles
Oct 22, 2026
Merged

CVasilakis merged 5 commits into
CVasilakis:betafrom
VadymMelnychuk:tvos-tiles

Conversation

@VadymMelnychuk

Copy link
Copy Markdown

Summary

Two new options in Appearance → Tiles, both off by default, so the home screen looks exactly as
before until the user changes them:

  • Focus style: Frame (default, today's accent frame and 1.1 zoom) or Lift: no frame, the
    focused tile zooms to 1.15 and rises toward the viewer, casting a soft shadow, as on Apple TV.
  • App name: Off (default) or When focused: the focused tile's app name shows centered below
    it, in the primary text color, cut with "…" to the tile's width, fading in and out with the
    focus. The rows leave room for it, so it never covers the next row.

Both are stored like every other option, shown and stepped in the appearance editor, and drawn
in its preview.

Motivation

I switched an old Philips TV (Android 7.1.2, 1.6 GB RAM) from Projectivy to Luncher, and wanted
the Apple TV-like home screen: the focused tile lifts out of the grid and its name shows below it.
The lift is easy to see from the couch. The name helps with apps whose banner is only a logo.

Both had to cost nothing on a low-memory TV:

  • the shadow is the renderer's elevation shadow;
  • nothing is allocated per key press;
  • the default look is unchanged.

If you'd rather see this as an issue first, or shaped differently (for example as one
"Apple TV style" switch instead of two options), I'm happy to rework it.

What changed, per module

:domain

  • FocusStyle (FRAME, LIFT) in TileStyle.focus: a redraw only.
  • AppName (OFF, WHEN_FOCUSED) in TileGeometry.appName: part of the geometry, since the
    rows leave room for the name, which is a new layout.
  • AppearanceOption.FocusStyle and AppearanceOption.AppName, listed in the Tiles group after
    the corner radius.
  • TileGrid takes a nameHeight, the room below each row (the last one too) for the focused
    tile's name; TileLayouts takes the name's measured height from the view and passes it on only
    while names show (nameRoom). The moves and the focus (TileMoves, TileFocus) are
    unchanged: they depend on the order and the columns only.

:platform

  • PreferencesAppearanceSettings: new keys tile_focus_style and tile_app_name, stored by name
    like the other choices. A missing key (settings stored by 0.3.0) or an unknown value reads as the
    default, Frame and Off.

:feature:home

  • AppTileView: per focus style, its own state animator (home_tile_focus.xml as before, new
    home_tile_lift.xml: scale 1.15 and translationZ of home_tile_lift, 12 dp). The shadow is
    Android's own elevation shadow, cast from a ViewOutlineProvider shared by all tiles
    (TilePaints.tileOutline) that follows the corner radius, Pill included. The focus frame is
    drawn only in the Frame style; a held tile keeps its white frame and 1.15 zoom in both styles.
  • The app name is drawn by the tile itself below its bounds (the tiles' parent doesn't clip them),
    so it zooms and lifts with the tile; ellipsized once per tile size; outlined with
    WallpaperOutline like everything else on the wallpaper; faded by a ValueAnimator made with
    the tile, in config_shortAnimTime, reversed when the focus leaves mid-fade.
  • TilePaints: the name's paint and measured height (nameHeight: the gap plus a 16 sp line, at
    the largest zoom a tile gets), the focus style, the shadow's outline.
  • AppTilesView: hands the name's height to TileLayouts, restyles the tiles on a new focus
    style, and scrolls a focused tile's name into sight too.

:feature:settings

  • Labels for both options and their values (Focus style: Frame / Lift; App name: Off / When
    focused), in English, Greek and Arabic.
  • AppearancePreviewView: Lift draws the focused sample tile at 1.15 without a frame, over a few
    translucent offset rounded rings around the tile standing for the shadow (no blur, nothing
    allocated while drawing); with the name shown, a block below the focused tile, the rows laid out by the same
    TileLayouts with the name's room.

Commits

  1. Leave room below each row of tiles for a name, when a layout asks for it: TileGrid only.
  2. Lift the focused tile with a shadow, and show its app's name below it, as the appearance says:
    the models, the home screen and the preview.
  3. Offer the focus style and the app name in the appearance editor's Tiles group: the options,
    their storage, labels and translations.

Docs

docs/ARCHITECTURE.md (the parts and options of Appearance), feature/home/README.md (how the
focus styles and the name are drawn, and what keeps them light), feature/settings/README.md (the
preview), domain/README.md, and the root README's feature list.

Screenshots

New reference images (Roborazzi, recorded with recordRoborazziDebug):
feature/home/src/test/screenshots/home/home_screen_lifted_name.png (Lift + When focused),
home_screen_long_name.png (a long name cut to the tile's width), home_arranging_lifted.png
(held tile, lifted); feature/settings/src/test/screenshots/settings/preview/focusstyle_lift.png,
appname_when_focused.png. Changed, with the two new rows in the open Tiles group:
settings_appearance_changed.png, settings_appearance_arabic.png,
settings_appearance_small_screen.png. No existing home screen image changed.

How it was tested

JVM tiers on Windows 11, JDK 21:

./gradlew :domain:test testDebugUnitTest verifyRoborazziDebug :app:lintDebug assembleDebug --continue
Module Before (v0.3.0) After
:domain 283 / 283 291 / 291
:feature:home 323 / 323 442 / 442
:feature:settings 755 / 755 756 / 756
:app 1 / 1 1 / 1
:platform 128 / 155 129 / 156
  • verifyRoborazziDebug: passes (images above recorded with recordRoborazziDebug).
  • :app:lintDebug: no issues (warnings as errors).
  • assembleDebug: OK.
  • The 27 :platform failures (FilesPicturesTest, CachedPictureImagesTest,
    MediaFolderPicturesTest, WorkingCopyImagesTest, FileStoredWallpaperTest) fail the same
    way on v0.3.0 on this Windows host (replacing a file in place); they don't touch the code
    changed here, and should pass on CI's Linux.
  • Each commit was built and tested on its own (:domain:test for the first; the JVM tests,
    screenshots and assembleDebug for the second).

New tests:

  • TileGridTest, TileLayoutsTest: the room below each row, the last one too, only while names
    show; moves and focus unchanged.
  • AppearanceOptionTest, AppearanceOptionsTest: the options, their values and defaults, the
    part each one changes.
  • PreferencesAppearanceSettingsTest: the stored format with the two new keys, settings stored
    before them, unknown values.
  • HomeAppearanceTest: the lifted tile's zoom and translationZ, the others down; the shadow's
    outline with the corners (Pill); a new focus style without a layout pass; the held tile's zoom
    when lifted; the rows' room for the name, at the top and at the bottom; scrolling a name into
    sight; drawing lifted with a name allocates nothing.
  • HomeLayoutTest (every screen, language, API 33 and 36): the home screen and arrange mode fit
    with Lift and When focused, each tile's name, at the largest zoom, clear of the other tiles.
  • AppearanceActivityTest: the rows, and stepping both options.
  • The catalog-wide tests (home screen, preview, storage round trip) pick up both options.

On a real TV: Philips 32PFS6402/12, Android 7.1.2 (API 25), MediaTek MT5861, 1.6 GB RAM.

  • Debug build: the new options show in Appearance → Tiles and in the preview.
  • With Lift + When focused, the focused tile rises with the elevation shadow (hardware rendering), shows no frame, and shows its name below it.
  • D-pad focus moves as before.
  • The release build (R8) is 187 KB, against 194 KB for v0.3.0.

Not run: the instrumented tiers (connectedDebugAndroidTest) on the emulators. I don't have the
android-tv-wsl-dev-tools setup; I checked on the real API 25 TV instead.

Needs review

  • Greek and Arabic labels: written without a native speaker, so please check them.
    • Greek: "Στυλ επιλογής / Πλαίσιο / Ανύψωση / Όνομα εφαρμογής / Επιλεγμένη". "When focused" is
      shortened to "Επιλεγμένη" to fit the narrowest editor layout.
    • Arabic: "نمط التحديد / إطار / رفع / اسم التطبيق / عند التحديد".
  • Shadow strength: the shadow is Android's default elevation shadow. It is clearly visible on
    a wallpaper and faint on the plain dark background. Tuning home_tile_lift (12 dp) is a
    one-line change if you prefer it stronger.
  • AI assistance: the change was written with Claude Code and tested on my TV.

Compatibility and performance

  • API 22+: elevation, translationZ, ViewOutlineProvider and Outline.setRoundRect exist
    since API 21, so nothing needs an SDK_INT guard; lint (warnings as errors) passes.
  • No allocation per key press: the state animators and the name's fade animator are made with
    each tile (or when the focus style changes, a stored setting), the name is ellipsized when the
    tile's size changes, the outline provider is shared and Android reuses its Outline. Drawing the
    tiles, lifted with a name, allocates nothing (HomeAppearanceTest), as does drawing the preview.
  • Hardware shadow: the shadow is the renderer's elevation shadow from the tile's outline, no
    setShadowLayer, no software layer, no blurred bitmap. Only the one focused tile is raised.
  • Layout: the room for the name changes only the rows' spacing (and the bottom margin of the
    last row), so with names off the layout is identical to before, and the D-pad focus and the
    moves in arrange mode are the same with names on.

🤖 Generated with Claude Code

Vadym Melnychuk added 3 commits October 22, 2026 00:46
TileGrid takes a nameHeight: room below every row, the last one too, for the name the focused
tile can show under it. The rows are that much further apart and the content that much taller,
so rows at the bottom of the space end that much higher. Nothing else moves: the tiles keep their
size, and the moves and the focus, which depend on the order and the columns only, are the same.

- The default is no room, so every layout made today is unchanged.
- A negative room is refused, as a negative tile count is.
…, as the appearance says

Two new values in the appearance's tile parts, both off by default, so the home screen and the
editor's preview look as before until they're set: how the focused tile stands out
(TileStyle.focus: a frame, or lifted, as on Apple TV) and whether its app's name shows below it
(TileGeometry.appName). The name is part of the geometry since the rows leave it room, a new
layout; the focus style only redraws.

- Lifted, the focused tile has no frame, zooms to 1.15 and rises 12 dp (translationZ, in a state
  animator of its own, home_tile_lift.xml), so Android's renderer casts its shadow from the
  tile's outline: one ViewOutlineProvider all tiles share, a rounded rectangle with the tiles'
  corners, round ends too. No blurred bitmap, no software layer, nothing drawn per frame in
  Luncher's code, on every API level from 22. A new focus style swaps each tile's state animator
  and puts the tile where the new one has it at once.
- A held tile keeps its white frame and its zoom in both styles, so arranging still tells it from
  one only focused.
- The name is drawn by the tile below its bounds, which AppTilesView doesn't clip, so it zooms and
  lifts with it: 16 sp in the primary text color, centered, cut with "…" to the tile's width once
  per size, outlined like everything on the wallpaper, fading in and out with the focus in the
  zoom's time through an animator made with the tile.
- TileLayouts gets the name's height from the view (TilePaints.nameHeight: its gap and one line
  at the largest zoom a tile gets), as the domain can't measure text, and passes it to the grids
  only while names show (nameRoom); the arrange mode's shelf leaves it room the same way, and a
  tile scrolled into sight shows its name too. The moves and the focus are unchanged.
- Drawing the tiles, lifted with a name, still allocates nothing; a focus move only starts the
  animators made with each tile.
- The editor's preview draws both from the same layouts: the focused sample tile lifted over a
  few translucent rounded rings for the shadow, without its frame, and a block below it for the
  name.
- Docs: the home screen's README (how both are drawn, what keeps them light), the preview in the
  settings' README, the models in the domain's.
…es group

The two looks the home screen can now draw become options of the catalog, after the corner
radius: Focus style (Frame, Lift) and App name (Off, When focused). Their first value is today's
look, so nothing changes until the user steps them.

- Stored by name under tile_focus_style and tile_app_name. Settings stored before have neither
  key, and read as Frame and Off; an unknown value reads as its option's default, changing
  nothing else.
- Labels in English, Greek and Arabic. App name's Off is the existing Off; "When focused" fits
  the editor's narrowest screen in each language (the Greek one is shorter for that).
- The catalog-wide tests now cover both: each value changes what the home screen and the preview
  draw, and reads back after a restart. New preview reference images for Lift and When focused;
  the editor's images with the Tiles group open have the two rows more.
- Docs: the appearance's parts and options in ARCHITECTURE.md, and the feature list.
- Ran: :domain:test 291 of 291; testDebugUnitTest: :feature:home 442 of 442, :feature:settings
  756 of 756, :app 1 of 1, :platform 129 of 156, the 27 failing the same on this Windows host
  without the change (file replacement in FilesPicturesTest and others, unrelated);
  verifyRoborazziDebug; :app:lintDebug, no issues; assembleDebug.
@CVasilakis
CVasilakis changed the base branch from main to beta October 21, 2026 23:00
@CVasilakis

Copy link
Copy Markdown
Owner

Thanks for this! I tested it with many apps and measured it against beta. I rebased it onto beta (the development branch) and will push it to your branch. If you work on it further, please fetch first (git fetch && git reset --hard origin/tvos-tiles).

…e default geometry, and fix the Greek "When focused"

Follow-ups from reviewing the focus style and app name options, on top of the contributor's
three commits.

- A hidden app's tile on arrange mode's shelf now dims its name with it, by the same 40 % as its
  image (TilePaints.HIDDEN_ALPHA), outline included. It was drawn at full strength under a dimmed
  tile.
- TilePaints.showsNames starts as TileGeometry()'s app name says, as corners and focusStyle
  start from TileStyle(). AppTilesView sets it only when its geometry changes from that same
  default, so the two now always begin alike. Before, a default of When focused would have left
  the rows room for names that were never drawn. Nothing changes today: the default stays Off.
- Greek "When focused" is "Επιλεγμένης", which agrees with "Όνομα εφαρμογής" (the name of the
  selected one). "Της επιλεγμένης" reads better but squeezes the label on a 720p screen.
- Docs: feature/home's README says the hidden app's name is dimmed and no longer names another
  product for Lift; two paragraphs there and the preview's in feature/settings' README rewrapped.
- Ran: :domain:test (305), testDebugUnitTest (:feature:home 444, :feature:settings 828,
  :platform 167, :app 1), verifyRoborazziDebug and :app:lintDebug, all passing. Both new tests
  failed first: the dimmed name with the old drawing, the names' start with it broken on purpose.
  Emulator tests not run.
…ppearance preview alike

The preview left a fixed 31 dp below each row for the focused tile's name, a copy of what the home
screen measures from the name's font (its gap and one line, at the largest zoom). The two agreed
in English at the default text size only: a larger font size on the TV, or a language with a
taller font, gave the home screen more room and left the preview's as it was. The preview couldn't
measure it the same way, as the name's size and gap were :feature:home's resources, which
:feature:settings may not use.

- TileName (:ui) holds the name's paint, its gap and room(zoom), the room it takes below a tile
  at a zoom, measured from the font. Its text size and gap (16 sp, 8 dp) move from :feature:home
  to :ui as tile_name_text and tile_name_gap. :ui is where the two features already share what
  they draw alike (WallpaperOutline); no new layer.
- TilePaints takes the name's paint, gap and room from it, at the largest zoom a tile gets, as
  before; AppTileView and the home screen draw exactly as they did.
- AppearancePreviewView measures with it at its largest zoom (Lift's, the home screen's largest
  too) and converts to its sample dp. NAME_ROOM and NAME_GAP are gone; the name's block keeps its
  illustrative size. At 1080p the measured room rounds to the same pixels, so no reference image
  changed.
- Docs: TileName in ui/README.md; the home screen's and the preview's READMEs say both measure
  the name alike. A final pass also corrects the held tile's description: it has the largest
  zoom, which a lifted tile only focused has too, so with Lift the white frame alone tells them
  apart (feature/home's README and AppTileView).
- Ran: :domain:test (305), testDebugUnitTest (:feature:home 444, :feature:settings 829,
  :platform 167, :app 1), verifyRoborazziDebug and :app:lintDebug, all passing. The new preview
  test (at font size 1.3 the rows move with names shown, and nothing moves without) failed with
  the fixed room. Emulator tests not run.
@CVasilakis

Copy link
Copy Markdown
Owner

Thanks again! I added two commits on top:

  • Review follow-ups: a hidden app's name is now dimmed with its tile in arrange mode. Also the tiles' names start from the default geometry, so the paints and the layout can't disagree if the default ever changes.
  • The name's room measured once: a new TileName in :ui measures the room for the name, used by the home screen and the preview alike. So the preview follows the device's font size and language too, instead of a fixed 31 dp.

@CVasilakis
CVasilakis merged commit b13a6bb into CVasilakis:beta Oct 22, 2026
18 checks 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.

2 participants