This repo contains samples built with Jetpack Compose for the Microsoft Surface Duo.
Перейти к файлу
Alin-Mihai Argeanu 233ac43522
Alargean/compose sample updates (#99)
* save slider state when configuration changes occurs

* update sample apps color to light blue

* update sample apps top bar and status bar color to light blue

* not show top bar on the bottom screen in dual-landscape mode

* update screenshots

* change icons color
2022-07-21 11:56:34 +03:00
.github Added issues and PR templates (#85) 2022-04-05 11:44:47 +02:00
CompanionPane Alargean/compose sample updates (#99) 2022-07-21 11:56:34 +03:00
ComposeGallery Update ComposeTesting version (#97) 2022-07-12 13:26:50 -07:00
Diary Unmesh/compose diary (#98) 2022-07-15 09:40:57 -07:00
DragAndDrop Introduce DragAndDrop sample (#88) 2022-06-21 18:02:59 -07:00
DualView Alargean/compose sample updates (#99) 2022-07-21 11:56:34 +03:00
DyAdd Calculator (#91) 2022-06-17 08:48:56 -06:00
ExtendedCanvas Alargean/compose sample updates (#99) 2022-07-21 11:56:34 +03:00
ListDetail Alargean/compose sample updates (#99) 2022-07-21 11:56:34 +03:00
NavigationRail Introduce DragAndDrop sample (#88) 2022-06-21 18:02:59 -07:00
SourceEditorCompose Adding Source Editor Compose sample (#96) 2022-07-14 16:10:21 -07:00
TwoPage Alargean/compose sample updates (#99) 2022-07-21 11:56:34 +03:00
VideoPlusChat VideoPlusChat (#92) 2022-06-23 11:37:34 -06:00
gradle/wrapper Use correct fold size units and update content drawer logic (#80) 2022-02-02 18:00:40 -05:00
screenshots Alargean/compose sample updates (#99) 2022-07-21 11:56:34 +03:00
.gitignore NavigationRail sample (#56) 2021-10-28 14:03:03 -04:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2021-01-12 11:59:30 -08:00
CONTRIBUTING.md Rename the package for TwoPaneLayout (#32) 2021-06-22 12:04:04 -07:00
LICENSE Updating LICENSE to template content 2021-01-12 11:59:32 -08:00
README.md Unmesh/compose diary (#98) 2022-07-15 09:40:57 -07:00
SECURITY.md Initial SECURITY.md commit 2021-01-12 11:59:36 -08:00
SUPPORT.md Initial SUPPORT.md commit 2021-01-12 13:43:34 -08:00
build.gradle Move TwoPaneLayout to separate repo (#68) 2021-11-11 09:04:20 -05:00
dependencies.gradle Update ComposeTesting version (#97) 2022-07-12 13:26:50 -07:00
gradle.properties Move TwoPaneLayout to separate repo (#68) 2021-11-11 09:04:20 -05:00
gradlew Move TwoPaneLayout to separate repo (#68) 2021-11-11 09:04:20 -05:00
gradlew.bat Move TwoPaneLayout to separate repo (#68) 2021-11-11 09:04:20 -05:00
ktlint.gradle Use correct fold size units and update content drawer logic (#80) 2022-02-02 18:00:40 -05:00
settings.gradle Unmesh/compose diary (#98) 2022-07-15 09:40:57 -07:00

README.md

page_type name languages products description urlFragment
sample Surface Duo - Jetpack Compose samples
kotlin
surface-duo
Samples showing how to use Jetpack Compose to achieve dual-screen user interface patterns. all

build-test-check Compose Version

Surface Duo Jetpack Compose Samples

This repo contains samples built with Jetpack Compose for the Microsoft Surface Duo and other large screen and foldable devices. These samples demonstrate our dual-screen user interface patterns with the new UI framework.

Please read the code of conduct and contribution guidelines.

Getting Started

When importing the code samples into Android Studio, use the repository directory as the base directory of the project. This lets you access and run all of the sample modules from within the same project.

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

Please check out our page on Jetpack Compose for Microsoft Surface Duo for more details.

Prerequisites

  • Jetpack Compose version: 1.1.1

  • Jetpack WindowManager version: 1.0.0

  • Android Studio version: Bumblebee 2021.1.1

Microsoft Compose Libraries

The samples are built with Microsoft Compose libraries, TwoPaneLayout, WindowState and ComposeTesting.

Contents

Sample Description
ComposeGallery ComposeGallery app icon Sample with a Microsoft Surface Duo theme that shows how to use the List Detail app pattern.
CompanionPane CompanionPane app icon Photo editor sample that shows how to build the Companion Pane app pattern in Jetpack Compose.
ExtendedCanvas ExtendedCanvas app icon Map sample that shows how to build the Extended Canvas app pattern in Jetpack Compose.
ListDetail ListDetail app icon Photo gallery sample that shows how to build the List Detail app pattern in Jetpack Compose.
DualView DualView app icon Restaurant finder sample that shows how to build the Dual View app pattern in Jetpack Compose.
DyAdd DyAdd app icon Calculator sample that uses the Extended Canvas app pattern in Jetpack Compose.
Two Page TwoPage app icon E-reader sample that shows how to build the Two Page app pattern in Jetpack Compose.
NavigationRail NavigationRail app icon Nature-themed sample that shows how to use a combination of NavigationRail and BottomNavigation when building apps for large screen and foldable devices in Jetpack Compose.
SourceEditor Source editor sample that shows how to build the Dual View app pattern in Jetpack Compose.
VideoPlusChat Video streaming platform sample that displays a video and accompanying chat in a Companion Pane app pattern.
DragAndDrop DragAndDrop app icon Drag and Drop sample that shows how to implement drag and drop in your Android app, following the Android drag and drop guidance in Jetpack Compose.
Diary Diary app sample that encorporates Calendar view on one pane and diary editor for the selected date on the other pane, following the Android Companion Pane app pattern.
Blog post Video
Video+Chat and Calculator samples for Jetpack Compose Twitch #77: New Jetpack Compose samples
Jetpack Compose TwoPaneLayout update Twitch #76: Jetpack Compose TwoPaneLayout update
Write foldable tests quickly with Test Kit Twitch #63: Test Kit for foldable apps
Jetpack Compose UI testing Twitch #59: Jetpack Compose testing
Jetpack Compose WindowState preview Twitch #53: Jetpack Compose WindowState for foldable devices
Get started with Jetpack Compose Twitch #44: Get started with Jetpack Compose
Jetpack Compose Navigation Rail Twitch #42: Jetpack Compose Navigation Rail
New TwoPaneLayout Compose library preview Twitch #25: TwoPaneLayout preview for Jetpack Compose
Jetpack Compose foldable and dual-screen development Twitch #9: Jetpack Compose samples
Jetpack Compose on Microsoft Surface Duo N/A

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.