Skip to content

Fixing adaptive navigation, initial support for tablet/foldable UI - #464

Open
XCroatoanX wants to merge 14 commits into
ssalggnikool:masterfrom
XCroatoanX:fixing-adaptive-navigation
Open

Fixing adaptive navigation, initial support for tablet/foldable UI#464
XCroatoanX wants to merge 14 commits into
ssalggnikool:masterfrom
XCroatoanX:fixing-adaptive-navigation

Conversation

@XCroatoanX

Copy link
Copy Markdown
Contributor

Fixed navigation3-adaptive not working correctly after alpha 5 update. Initial support for foldable devices and tablets. Fixed #403.

@XCroatoanX

Copy link
Copy Markdown
Contributor Author

Still need to fix bottom bar showing when loading data for the first time from server at login.

@mziedina5102

Copy link
Copy Markdown
Contributor

initial support for tablet/foldable UI? Are you starting to work on #379 ? Or am I just dreaming

@XCroatoanX

XCroatoanX commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@mziedina5102 Not fully, currently I was concentrated on solving the issue with our adaptive navigation package. This will be the first step to fixing this issue. Unfortunately it does not look as good as it should be, but it is the first step to improved UI. It looks good on tablets and foldables though
Screenshot_20260802-112950

@XCroatoanX XCroatoanX closed this Aug 2, 2026
@XCroatoanX XCroatoanX reopened this Aug 2, 2026
@XCroatoanX

Copy link
Copy Markdown
Contributor Author

Bottom bar and miniplayer should be not visible in settings page. Will be fixed today

@mziedina5102

mziedina5102 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

App size gone from 20MB to 36MB (at least on my android 16 snapdragon)
APK size from 10MB before (https://github.com/ssalggnikool/Navic/actions/runs/30587708578) to 35MB
Also the UI feels very sluggish and heavy compared to before. When scrolling I can feel micro-freezes
Is it expected?

@ssalggnikool

Copy link
Copy Markdown
Owner

App size gone from 20MB to 36MB (at least on my android 16 snapdragon) APK size from 10MB before (https://github.com/ssalggnikool/Navic/actions/runs/30587708578) to 35MB Also the UI feels very sluggish and heavy compared to before. When scrolling I can feel micro-freezes Is it expected?

PR artifacts are built in debug mode so they will be less optimised

subtitle = Res.string.subtitle_about
)
}
Spacer(Modifier.windowInsetsBottomHeight(WindowInsets.navigationBars))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

settings screen content is beneath the camera area of the screen in landscape mode and there is also an empty area beside titles

Image

the navigation animation is shown when the detail pane is changed, this doesn't look very good, this happens outside of settings as well and it looks even worse

Screen_recording_20260807_144424.webm

also when you navigate into a screen in settings the previous screen will get scrolled downward for some reason?

Screen_recording_20260807_150247.webm

i don't think there was a need to change settings screens padding at all, it was already working correctly in landscape mode because the bottom bar isn't shown in settings or anything

import paige.navic.util.ui.easedVerticalGradient

@Composable
fun RootBottomBar(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

the mini player has different horizontal padding compared to the bottom bar

Image

the mini player is horizontally centered on screen but the bottom bar has some padding on the left because the camera area of the screen is there, the mini player should be inset like that as well

the unified style of the mini player demonstrates this more clearly, the cover art is now beneath the camera area of the screen

Image

)
BottomBar(
containerColor = if (preferenceManager.miniPlayerStyle == MiniPlayerStyle.Detached)
NavigationBarDefaults.containerColor.copy(alpha = 0f)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

do not change this to Color.Transparent, BottomBar animates containerColor

Color.Transparent is Color.Black (or White, i don't remember) with an alpha of 0f, so if you animate the colour going from NavigationBarDefaults.containerColor to Color.Transparent it will become somewhat black during the animation

essentially, we only want to animate the alpha, and nothing else about the colour

import paige.navic.util.ui.easedVerticalGradient

@Composable
fun RootBottomBar(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

bottom bar is no longer themed with the dynamic theme setting enabled

Image

}
}
},
bottomBar = {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

the FAB in the playlist list screen is beneath the bottom bar now, making it impossible to click

Image

Comment thread composeApp/src/commonMain/kotlin/paige/navic/util/ui/PaddingUtils.kt Outdated
Comment thread composeApp/src/commonMain/kotlin/paige/navic/App.kt Outdated
Comment on lines -46 to -52
modifier = modifier.then(
if (preferenceManager.miniPlayerStyle == MiniPlayerStyle.Detached)
Modifier.background(
Brush.easedVerticalGradient(color = MaterialTheme.colorScheme.surface.copy(alpha = shadowFadeProgress))
)
else Modifier
)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

easedVerticalGradient was an intentional design choice, not sure why u removed it

Comment on lines +137 to +155
val selectedTabId = remember(backStack.size, backStack.lastOrNull(), tabs) {
val lastKey = backStack.lastOrNull() ?: return@remember tabs.firstOrNull()?.id
tabs.find { tab ->
val item = when (tab.id) {
NavbarTab.Id.LIBRARY -> NavItem.LIBRARY
NavbarTab.Id.ALBUMS -> NavItem.ALBUMS
NavbarTab.Id.PLAYLISTS -> NavItem.PLAYLISTS
NavbarTab.Id.ARTISTS -> NavItem.ARTISTS
NavbarTab.Id.SEARCH -> NavItem.SEARCH
NavbarTab.Id.GENRES -> NavItem.GENRES
NavbarTab.Id.SONGS -> NavItem.SONGS
NavbarTab.Id.RADIOS -> NavItem.RADIOS
}
// Use class name to match destinations even if arguments differ
val entryClassName = lastKey::class.qualifiedName
val destClassName = item.destination::class.qualifiedName
entryClassName == destClassName || (lastKey is Screen.Settings && tab.id == NavbarTab.Id.LIBRARY)
}?.id ?: tabs.firstOrNull()?.id
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

what is the point of this? what is it fixing? the previous logic

val selected = backStack.lastOrNull() == item.destination

seemed to work fine before

Comment thread composeApp/src/commonMain/kotlin/paige/navic/ui/components/layouts/BottomBar.kt Outdated
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.

[Enhancement]: Fixed navbar and miniplayer through views

3 participants