Skip to content

Commit

Permalink
Hide the top bar, for a cleaner look.
Browse files Browse the repository at this point in the history
The app looks much cleaner if the top bar blends in with the background (same
color) and if we omit the title.

Tested by:
- Manual testing of several screens.
- ./gradlew connectedCheck
- ./gradlew check

Signed-off-by: Kevin Deus <[email protected]>
  • Loading branch information
kdeus committed Nov 25, 2024
1 parent 6109ab6 commit e3166ee
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,12 @@ fun ScreenWithAppBar(
topBar = {
CenterAlignedTopAppBar(
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.primaryContainer,
// The app looks cleaner if the top bar is invisible (same color as the bg).
containerColor = MaterialTheme.colorScheme.background,
titleContentColor = MaterialTheme.colorScheme.primary,
),
title = {
Text(
title, maxLines = 1, overflow = TextOverflow.Ellipsis
)
},
// The app looks cleaner if we omit the title.
title = {},
navigationIcon = navigationIcon,
scrollBehavior = scrollBehavior,
actions = actions,
Expand Down

0 comments on commit e3166ee

Please sign in to comment.