{"id":21803347,"url":"https://github.com/cesarvaliente/navigationrail-wm-sample","last_synced_at":"2026-05-16T11:32:10.245Z","repository":{"id":141836557,"uuid":"384193286","full_name":"CesarValiente/NavigationRail-WM-Sample","owner":"CesarValiente","description":"This is a sample that shows the power of using NavigationRail, BottomNavigation, latest Navigation component and WindowManager altogether, so depending on the device form factor used (single screen or foldable/dual-screen), a specific UI navigation will be shown to the user, taking advantage of the extra-room that these new devices provide.","archived":false,"fork":false,"pushed_at":"2021-08-18T11:03:32.000Z","size":549,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T02:49:17.321Z","etag":null,"topics":["android","bottomnavigation","dual-screen","foldables","jetpack-navigation","navigationrail","surface-duo","windowmanager"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CesarValiente.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-08T16:56:59.000Z","updated_at":"2022-12-26T03:57:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef8c315d-f349-40ea-a466-fb6110e66a25","html_url":"https://github.com/CesarValiente/NavigationRail-WM-Sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CesarValiente/NavigationRail-WM-Sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FNavigationRail-WM-Sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FNavigationRail-WM-Sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FNavigationRail-WM-Sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FNavigationRail-WM-Sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CesarValiente","download_url":"https://codeload.github.com/CesarValiente/NavigationRail-WM-Sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FNavigationRail-WM-Sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","bottomnavigation","dual-screen","foldables","jetpack-navigation","navigationrail","surface-duo","windowmanager"],"created_at":"2024-11-27T11:41:44.721Z","updated_at":"2026-05-16T11:32:10.226Z","avatar_url":"https://github.com/CesarValiente.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NavigationRail-WM-Sample\n\nThis is a sample app that uses the following components in order to show an adjusted and dynamic UI that fits better with the specific device screen mode or form-factor used:\n- [NavigationRail](https://github.com/material-components/material-components-android/blob/master/docs/components/NavigationRail.md)\n- [BottomNavigation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md)\n- [Jetpack WindowManager](https://developer.android.com/jetpack/androidx/releases/window)\n- [Navigation](https://developer.android.com/jetpack/androidx/releases/navigation) (important, using new stuff coming in 2.4.0-alpha04 version)\n\n## How does it work?\n\nOn single screen devices, a BottomNavigation will be shown to the user to navigate through the app,\nbut when there is a [FoldingFeature](https://developer.android.com/reference/androidx/window/FoldingFeature) separating the content, a NavigationRail will be used instead of the BottomNavigation providing a different and in some scenarios better user experience.\n\nThis approach can be easily adapted as well to tablets and big-screens.\n\n### Examples\n\nApp running on a dual-screen device:\n![Surface Duo showing the app using BottomNavigation on single screen mode](./art/app-single-screen.png)\n![Surface Duo showing the app using NavigationRail when is spanned across displays](./art/app-dual-screen.png)\n\nApp running on a foldable device:\n![Foldable device showing the app using BottomNavigation on multi-window mode](./art/foldable-multi-window.png)\n![Foldable device showing the app using NavigationRail when is in full-screen (spanned) mode](./art/foldable-spanned.png)\n\n## Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). \nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## License\n\nCopyright (c) Microsoft Corporation.\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and\nassociated documentation files (the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge, publish, distribute,\nsublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial\nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT\nLIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesarvaliente%2Fnavigationrail-wm-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesarvaliente%2Fnavigationrail-wm-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesarvaliente%2Fnavigationrail-wm-sample/lists"}