Commit 4457a93
Add bottom sheet recipe (#67)
* Adding tests for Navigator
* First draft of Navigator for nested and shared destinations
* Address AI feedback
* Add Nav2 activity and dependencies
* Add starting point for migration
* Step 1 of migration complete
* Lots of refactoring
* Add Step 4 of the migration
* Add Step 5 of the migration
* Part way through step 6 of migration
* Updating all steps
* Add final step 7.
* Tidy up imports
* Navigator uses SavedState APIs and KotlinX Serialization to persist state through config changes
* Remove remaining Nav2 references from step 7
* Handle shared routes
* Switch to using Saver
* Add bottom sheet recipe
This commit adds a recipe that demonstrates how to display a navigation
destination within a Material `ModalBottomSheet`.
It introduces `BottomSheetSceneStrategy`, a `SceneStrategy` that can be
added to a `NavDisplay`. This strategy checks for specific metadata on a
`NavEntry` to determine if it should be rendered as a bottom sheet.
A new `BottomSheetActivity` is added to showcase how to use this
strategy.
* Remove parenthesis from BottomSheetSceneStrategy
Doing this for Kotlin code syntax
* Minor edits
* Update headings in README for better structure
* Update to latest library versions and disable snapshot artifact repo
* Replace SnapshotStateList with NavBackStack
* Address Gemini feedback
* Add link to bug
* Create Supporting Pane Recipe
* Create Supporting Pane Recipe
* Update dependencies to sync with Supporting Pane PR
* Fix comments
* Fix comments
* Update README file
* Fix naming
* Add koin injected ViewModel recipe
* Slight formatting change
* Addressing AI code review
* Move Material recipes to their specific package
* Update README.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Add bottom sheet recipe
This commit adds a recipe that demonstrates how to display a navigation
destination within a Material `ModalBottomSheet`.
It introduces `BottomSheetSceneStrategy`, a `SceneStrategy` that can be
added to a `NavDisplay`. This strategy checks for specific metadata on a
`NavEntry` to determine if it should be rendered as a bottom sheet.
A new `BottomSheetActivity` is added to showcase how to use this
strategy.
* Remove parenthesis from BottomSheetSceneStrategy
Doing this for Kotlin code syntax
* Minor edits
* Add bottom sheet recipe
This commit adds a recipe that demonstrates how to display a navigation
destination within a Material `ModalBottomSheet`.
It introduces `BottomSheetSceneStrategy`, a `SceneStrategy` that can be
added to a `NavDisplay`. This strategy checks for specific metadata on a
`NavEntry` to determine if it should be rendered as a bottom sheet.
A new `BottomSheetActivity` is added to showcase how to use this
strategy.
* Remove parenthesis from BottomSheetSceneStrategy
Doing this for Kotlin code syntax
* Minor edits
* Update to alpha10
* Update gradle/libs.versions.toml
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Add migration guide
* Update guide
* Update guide
* Update guide
* Update guide
* Update guide
* Update guide
* Update guide
* Remove navigator package
* Fix errors in Bottomsheet Recipe
Fix imports and remove extra name attribute in manifest.
* Refactor to render NavDisplay on top of NavHost, rather than wrapping it
* Update to use alpha10 API
* Update links in migration guide
* Fix link to migration package
* Fix version
---------
Co-authored-by: Don Turner <[email protected]>
Co-authored-by: Don Turner <[email protected]>
Co-authored-by: Rob Orgiu <[email protected]>
Co-authored-by: Ian Lake <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent 71785e1 commit 4457a93
4 files changed
+179
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
Lines changed: 93 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
Lines changed: 79 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
0 commit comments