Skip to content

Commit 3d01108

Browse files
K2GO-439 fix(ui): remove the double bottom inset under the bottom nav
The Material BottomNavigationView and NavigationRailView inset themselves for the navigation bar, so padding the content container's bottom too left a large empty gap under the nav (seen on Settings). Pad only the top of the content for the status bar and let the Material nav components handle the bottom; drop the now-unused content container id.
1 parent b3f68c6 commit 3d01108

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎controller/app/src/main/java/org/appdevforall/k2go/redesign/LibraryActivity.java‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,11 @@ protected void onCreate(Bundle savedInstanceState) {
132132

133133
bottomNav = findViewById(R.id.k2go_bottom_nav);
134134
railNav = findViewById(R.id.k2go_nav_rail);
135-
// K2GO-439: targetSdk 35 forces edge-to-edge. Pad the content container (rail + content + bottom
136-
// nav) by the system bars so nothing draws under them in either orientation; the boot-gate overlay
137-
// is a sibling and stays full-screen. No IME inset here, so the bottom nav does not ride the keyboard.
138-
org.appdevforall.k2go.ui.EdgeToEdge.padAll(findViewById(R.id.k2go_content_root));
135+
// K2GO-439: targetSdk 35 forces edge-to-edge. Pad only the TOP of the fragment content for the
136+
// status bar; the Material BottomNavigationView and NavigationRailView inset THEMSELVES for the
137+
// navigation bar by default, so padding the container's bottom too would double the inset (a gap
138+
// under the nav). The boot-gate overlay is a sibling and stays full-screen.
139+
org.appdevforall.k2go.ui.EdgeToEdge.padTop(findViewById(R.id.k2go_nav_host));
139140
// K2GO-439: the install overlay is a sibling of the content container (not inside it), so inset
140141
// its bottom too, else its controls draw under the navigation bar during install.
141142
org.appdevforall.k2go.ui.EdgeToEdge.padBottom(findViewById(R.id.k2go_install_progress));

‎controller/app/src/main/res/layout/activity_library.xml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
medium/expanded (>= 600dp wide); the reverse in compact. Toggled at runtime by width in
1010
LibraryActivity, so rotation never recreates the activity (the boot gate is preserved). -->
1111
<LinearLayout
12-
android:id="@+id/k2go_content_root"
1312
android:layout_width="match_parent"
1413
android:layout_height="match_parent"
1514
android:orientation="horizontal">

0 commit comments

Comments
 (0)