From 49a50317cc1ba5d12c5a77ecfa9cfd255dc6fd3a Mon Sep 17 00:00:00 2001 From: Anurag Kanojiya Date: Wed, 2 Oct 2024 16:39:07 +0530 Subject: [PATCH 1/4] Changing order of buttons in Bottom App Bar --- .idea/appInsightsSettings.xml | 26 +++++++++++++++++++ .idea/misc.xml | 1 - .../view/composable/MyBottomAppBar.kt | 14 +++++----- 3 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 .idea/appInsightsSettings.xml diff --git a/.idea/appInsightsSettings.xml b/.idea/appInsightsSettings.xml new file mode 100644 index 00000000..371f2e29 --- /dev/null +++ b/.idea/appInsightsSettings.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 0ad17cbd..8978d23d 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/app/src/main/java/com/lorenzovainigli/foodexpirationdates/view/composable/MyBottomAppBar.kt b/app/src/main/java/com/lorenzovainigli/foodexpirationdates/view/composable/MyBottomAppBar.kt index 517a13a3..deb1a900 100644 --- a/app/src/main/java/com/lorenzovainigli/foodexpirationdates/view/composable/MyBottomAppBar.kt +++ b/app/src/main/java/com/lorenzovainigli/foodexpirationdates/view/composable/MyBottomAppBar.kt @@ -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, @@ -46,7 +40,13 @@ 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) { From 5b98c521e65f481ae563f1df08a80338ea5edcd1 Mon Sep 17 00:00:00 2001 From: Anurag Kanojiya Date: Sat, 5 Oct 2024 23:47:51 +0530 Subject: [PATCH 2/4] Updated routes according to order of options --- .../foodexpirationdates/view/composable/MyBottomAppBar.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/lorenzovainigli/foodexpirationdates/view/composable/MyBottomAppBar.kt b/app/src/main/java/com/lorenzovainigli/foodexpirationdates/view/composable/MyBottomAppBar.kt index deb1a900..ffb84ac7 100644 --- a/app/src/main/java/com/lorenzovainigli/foodexpirationdates/view/composable/MyBottomAppBar.kt +++ b/app/src/main/java/com/lorenzovainigli/foodexpirationdates/view/composable/MyBottomAppBar.kt @@ -50,9 +50,9 @@ fun MyBottomAppBar( ) 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( From 33b5239a56a34fc8a65c2e90485312aedfc6d1f3 Mon Sep 17 00:00:00 2001 From: Anurag Kanojiya Date: Sat, 5 Oct 2024 23:53:29 +0530 Subject: [PATCH 3/4] Delete .idea/misc.xml --- .idea/misc.xml | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .idea/misc.xml diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 8978d23d..00000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file From e279d913ba03d7e007aa828cc175452a32a5ae2c Mon Sep 17 00:00:00 2001 From: Anurag Kanojiya Date: Sat, 5 Oct 2024 23:53:49 +0530 Subject: [PATCH 4/4] Delete .idea/appInsightsSettings.xml --- .idea/appInsightsSettings.xml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .idea/appInsightsSettings.xml diff --git a/.idea/appInsightsSettings.xml b/.idea/appInsightsSettings.xml deleted file mode 100644 index 371f2e29..00000000 --- a/.idea/appInsightsSettings.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - \ No newline at end of file