feat: persistent visible back button for phones (#43) - #135
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
MobileBackButtoninapp/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 onLocalDeviceType.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.TopStart: DetailsScreen (mobile layout branch only), SettingsScreen, SearchScreen, WatchlistScreen. Each addition is the same 4 lines.Intentional exclusions
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.