Skip to content

Commit

Permalink
🎨 Change order of buttons in Bottom App Bar (#226)
Browse files Browse the repository at this point in the history
* Changing order of buttons in Bottom App Bar

* Updated routes according to order of options

* Delete .idea/misc.xml

* Delete .idea/appInsightsSettings.xml
  • Loading branch information
anuragkanojiya1 authored Oct 6, 2024
1 parent 52613cd commit 39b68ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
10 changes: 0 additions & 10 deletions .idea/misc.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ fun MyBottomAppBar(
currentDestination: String?
){
val navigationItems = listOf(
NavigationItem(
label = stringResource(id = R.string.about_this_app),
route = Screen.AboutScreen.route,
selectedIcon = Icons.Filled.Info,
unselectedIcon = Icons.Outlined.Info
),
NavigationItem(
label = stringResource(id = R.string.list),
route = Screen.MainScreen.route,
Expand All @@ -46,13 +40,19 @@ fun MyBottomAppBar(
route = Screen.SettingsScreen.route,
selectedIcon = Icons.Filled.Settings,
unselectedIcon = Icons.Outlined.Settings
)
),
NavigationItem(
label = stringResource(id = R.string.about_this_app),
route = Screen.AboutScreen.route,
selectedIcon = Icons.Filled.Info,
unselectedIcon = Icons.Outlined.Info
)
)
NavigationBar {
var selectedItem = when (currentDestination) {
Screen.AboutScreen.route -> 0
Screen.SettingsScreen.route -> 2
else -> 1
Screen.AboutScreen.route -> 2
Screen.SettingsScreen.route -> 1
else -> 0
}
navigationItems.forEachIndexed { index, item ->
NavigationBarItem(
Expand Down

0 comments on commit 39b68ed

Please sign in to comment.