Skip to content

Comments

refactor(nav): improve adaptive navigation#1121

Open
Cd16d wants to merge 4 commits intojarnedemeulemeester:mainfrom
Cd16d:feat-navigation
Open

refactor(nav): improve adaptive navigation#1121
Cd16d wants to merge 4 commits intojarnedemeulemeester:mainfrom
Cd16d:feat-navigation

Conversation

@Cd16d
Copy link
Contributor

@Cd16d Cd16d commented Jan 6, 2026

This commit refactors the adaptive navigation logic to provide a better user experience across different device sizes and orientations.

The new logic introduces the following changes:

  • Collapsed navigation rail for landscape phones, PCs, and landscape tablets.
  • New navigation bar medium for portrait tablets and foldables.
  • Standard bottom navigation bar for portrait phones.
  • Vertical centered NavigationItems in landscape
Phone Tablet
Portrait Screenshot_20260113_203210_Findroid Debug Screenshot_20260106_183933_Findroid Debug
Landscape Screenshot_20260106_183723_Findroid Debug Screenshot_20260106_183856_Findroid Debug

This commit refactors the adaptive navigation logic to provide a better user experience across different device sizes and orientations.

The new logic introduces the following changes:
- Collapsed navigation rail for landscape phones, PCs, and landscape tablets.
- New navigation bar medium for portrait tablets and foldables.
- Standard bottom navigation bar for portrait phones.
Copilot AI review requested due to automatic review settings January 6, 2026 18:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the adaptive navigation implementation to provide a more responsive and device-appropriate navigation experience across different screen sizes and orientations. The changes leverage newer Material3 Adaptive Navigation Suite APIs to select appropriate navigation patterns based on device characteristics.

  • Implements device-specific navigation patterns: collapsed navigation rail for landscape phones and tablets, medium navigation bar for portrait tablets/foldables, and standard bottom navigation bar for portrait phones
  • Replaces the previous adaptive logic with explicit breakpoint-based decision tree using height and width constraints
  • Vertically centers navigation items in rail layouts for improved visual hierarchy

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Cd16d added 3 commits January 13, 2026 17:41
This commit updates `NavigationRoot.kt` to use fully qualified names for `WindowSizeClass` constants instead of static imports.
@jarnedemeulemeester
Copy link
Owner

Seems like this uses the new flexible navigation bar from material 3 expressive. I am holding off from using any expressive components untill Google has released a stable version of androidx.material3 with those components.
That said it looks like this is part of a stable release...

Also, should we follow the official guidelines of also using a navigation bar in landscape phone view? I do feel like using a navigation bar wastes a lot of vertical screen space. But I just wanted to ask what you think

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