-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add BottomBar navigation #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
LunarX
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few first quick comments, the rest will come later
| ) | ||
| SinglePaneScaffold( | ||
| bottomBar = { | ||
| if (backStack.last() == NavDestination.Home || backStack.last() == NavDestination.Settings) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition could come from a common interface or a boolean in the parent class or a common parent class
| NavigationBar( | ||
| containerColor = AuthenticatorTheme.materialColors.surfaceContainerHighest, | ||
| ) { | ||
| Row( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .padding(horizontal = Margin.Micro) | ||
| .heightIn(min = 80.dp), | ||
| horizontalArrangement = Arrangement.SpaceEvenly, | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| ) { | ||
| NavigationBarItem( | ||
| selected = backStack.last() == NavDestination.Home, | ||
| onClick = { | ||
| backStack.clear() | ||
| backStack.add(NavDestination.Home) | ||
| }, | ||
| icon = { Icon(painterResource(R.drawable.home), null) }, | ||
| label = { Text(stringResource(R.string.accountTitle)) }, | ||
| ) | ||
| NavigationBarItem( | ||
| selected = backStack.last() == NavDestination.Settings, | ||
| onClick = { | ||
| backStack.add(NavDestination.Settings) | ||
| }, | ||
| icon = { Icon(painterResource(R.drawable.settings), null) }, | ||
| label = { Text(stringResource(R.string.settingsTitle)) }, | ||
| ) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole NavigationBar can go inside its own function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are lacking a preview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably already create the preview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This icon is not defined as strokes but as a outline. Can we not use the stroke version instead? Also don't we use ImageVectors for icons instead of xml? Also the size of this icon is not correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about the icon than the previous one
| <string name="accountTitle">Account</string> | ||
| <string name="accountsTitle">Accounts</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that not a plural? Also I see you're not using accountsTitle
| <string name="showAccountPasswordButton">Mostrar contraseña de la cuenta</string> | ||
| <string name="startButton">Comenzar</string> | ||
| <string name="subjectPlaceholder">Asunto</string> | ||
| <string name="submitMyTicketButton">Enviar mi billete</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of ticket are we talking about here, a support ticket or a real physical ticket? Also this also seems to be unused
No description provided.