surface-duo-compose-samples/ComposeGallery
Kristen Halper d4cb092e21
Create foldable/large screen helper module (#70)
* Create window-info module

* Update build.gradle settings

* Add helper classes

* Update ComposeGallery to use module

* Update to wm beta04 and twopanelayout alpha10

* Update Compose Gallery tests to follow new app structure

* Rename module and classes

* Update NavigationRail sample to use module

* Add window mode (~device posture) to window state

* Update companion pane to use module

* Fix module manifest formatting

* Update dual view to use module

* Update list detail to use module

* Update two page to use module

* Refactor WindowState properties

* Expose additional fold info in WindowState

fold state, isSeparating, and occlusion type

* Rename module to window state

* Rename package to windowstate

* Update large screen logic to only include expanded size class

* Add tests for window state module

* Remove FoldingFeature dependency in WindowState

* Remove redundant JWM dependencies

* Update ComposeGallery tests to use new fold state enum

* Remove unnecessary JWM imports from ComposeGallery tests
2021-12-10 15:11:37 -05:00
..
screenshots Move TwoPaneLayout to separate repo (#68) 2021-11-11 09:04:20 -05:00
src Create foldable/large screen helper module (#70) 2021-12-10 15:11:37 -05:00
.gitignore Move TwoPaneLayout to separate repo (#68) 2021-11-11 09:04:20 -05:00
README.md Move TwoPaneLayout to separate repo (#68) 2021-11-11 09:04:20 -05:00
build.gradle Create foldable/large screen helper module (#70) 2021-12-10 15:11:37 -05:00

README.md

Compose Gallery

This sample is built with Jetpack Compose, the new UI framework in Android.

Getting Started

To learn how to load apps on the Surface Duo emulator, see the documentation, and follow the blog.

Features

The sample uses the List-Detail app pattern to show a list of image thumbnails in the single screen. These thumbnails can be selected to open the full image. The action button in the app bar can also be used to switch between the list and detail views.

Screenshot

When the app is spanned into two screens, it shows the full image in the other screen. To select the image item from the list will show the full image accordingly.

Screenshot

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

Copyright (c) Microsoft Corporation.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.