Repository navigation
Conversation
Android 15 lays out apps targeting SDK 35 or later edge to edge, so the window extends behind the status and navigation bars. All three activities use a plain LinearLayout with the toolbar as the first child and none of them consume window insets, so the toolbar is drawn beneath the status bar. The result is that the title overlaps the clock and status icons, and the overflow menu sits inside the status bar strip, where taps open the notification shade instead of the menu. That makes Settings unreachable on Android 15 and later. Add a small applySystemBarInsets() helper and apply it to the root view of MainActivity, WorkoutHistoryActivity and WorkoutDetailActivity.
Author
|
Gentle follow-up on this one. It still applies cleanly to Same note as #36: there are no check runs on the head commit here either, which I think means the workflow approval for a first-time contributor is still pending on your side. The alternative I offered — top padding on the root, bottom padding on the |
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.
Fixes #33.
Problem
Android 15 lays apps out edge to edge when they target SDK 35 or higher, so the window extends behind the system bars and the app has to inset its own content.
targetSdkis already 35, but nothing in the project consumes window insets — there is nofitsSystemWindows, noWindowInsetshandling and noenableEdgeToEdge().activity_main.xml,activity_workout_history.xmlandactivity_workout_detail.xmlall use a plainLinearLayoutwith theToolbaras the first child, so on Android 15+ the toolbar is drawn beneath the status bar. The title collides with the clock and status icons, and the overflow menu lands inside the status bar strip where taps open the notification shade — which makes Settings and Debug unreachable.Change
Adds
ui/Insets.ktwith a singleView.applySystemBarInsets()extension, and calls it on the root view of the three activities right aftersetContentView.It consumes
systemBars() or displayCutout()— the cutout type matters in landscape on devices with a punch-hole camera, where it is not covered by the system bars alone. The listener returns the insets rather than consuming them, so child views can still react if that is ever needed.Four files, 35 insertions, no deletions. No behaviour changes beyond padding.
Testing
tools/lint.pypasses 4/4:app:assembleDebugand:app:assembleReleaseboth succeed (release exercises R8 full mode andlintVitalRelease)ed88b46build first, to be sure the problem was not self-inflicted.I went with padding the root view because it is the smallest change that fixes all three screens consistently. If you would rather the scrolling content ran under the navigation bar, the alternative is to pad only the top on the root and give the
RecyclerViewbottom padding withclipToPadding=false— happy to rework it that way if you prefer.