Skip to content

feat: persistent visible back button for phones (#43) - #135

Merged
ProdigyV21 merged 2 commits into
mainfrom
feat/mobile-back-button
Apr 5, 2026
Merged

feat: persistent visible back button for phones (#43)#135
ProdigyV21 merged 2 commits into
mainfrom
feat/mobile-back-button

Conversation

@ProdigyV21

Copy link
Copy Markdown
Owner

Closes #43.

On Android phones using gesture navigation, the system nav bar auto-hides after a short idle and users on deep screens (details, settings, search, watchlist) were left with no visible way to leave until they swiped up to re-reveal it. TV doesn't have this problem (hardware Back key always available) and tablets have enough screen real estate that it's less critical.

Changes

  • New component MobileBackButton in app/src/main/kotlin/com/arflix/tv/ui/components/MobileBackButton.kt. 40 dp translucent circular button in the top-start corner, inset from the status bar with .statusBarsPadding(), material ArrowBack icon. Gates itself on LocalDeviceType.current == DeviceType.PHONE \u2014 on tablet and TV it early-returns, so callers can drop it unconditionally without per-device branching and no extra composition node is created on non-phone devices.
  • Dropped into 4 screens as a sibling child of the existing root Box, aligned TopStart: DetailsScreen (mobile layout branch only), SettingsScreen, SearchScreen, WatchlistScreen. Each addition is the same 4 lines.

Intentional exclusions

  • HomeScreen \u2014 it's the app root, there's nothing to go back to.
  • PlayerScreen \u2014 already has its own dedicated close UI in the top controls and a persistent back button on top of the video would be visually noisy.
  • TvScreen (live TV) \u2014 back handling is well-established there and a floating button over the video would compete with the mini player UI.

Risk

Zero on TV and tablet (component no-ops). On phone it adds a single 40 dp clickable box in a fixed position \u2014 cannot overlap meaningfully with existing content because the screens all use scroll padding near the top.

Single new file, 4 tiny insertions. 101 lines total.

Arvin added 2 commits April 5, 2026 15:30
On Android phones running gesture navigation, the system nav bar
auto-hides after a short idle period. On deep screens (details,
settings, search, watchlist) users were left with no visible way to
leave the screen until they swiped up to re-reveal the system bar \u2014
which is non-obvious and disruptive. On TV the hardware Back key is
always available so the problem doesn't exist there. Tablets typically
have enough screen real estate that the system bar isn't an issue.

Added `MobileBackButton` composable that renders a 40 dp translucent
circular IconButton-shaped back button in the top-start corner,
inset from the status bar. It gates itself on
`LocalDeviceType.current == DeviceType.PHONE` and no-ops on tablet/TV,
so callers can drop it unconditionally into their UI without
per-device branching.

Dropped into 4 screens, in each case as a sibling child of the
existing root Box aligned `TopStart` so it floats above the scrolling
content:

- DetailsScreen (mobile layout branch only, not the TV layout)
- SettingsScreen
- SearchScreen
- WatchlistScreen

HomeScreen is excluded because it's the app root with nothing to go
back to. PlayerScreen is excluded because it has its own dedicated
close UI in the top controls. TvScreen (live TV) is excluded because
the Back key handling there is already well-established and adding a
floating button on top of the video would be visually noisy.

Tablet and TV layouts are completely unchanged \u2014 the component
early-returns for those device types so no layout recomposition or
extra node is added.

Closes #43
@ProdigyV21
ProdigyV21 merged commit 09442b4 into main Apr 5, 2026
2 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.

[UI improvement] visible back button

1 participant