Surface Duo - Xamarin SDK samples
This repo contains Xamarin and Xamarin.Forms Android samples for Surface Duo, all accessible from a single Visual Studio solution.
Build and Test
Open the Xamarin.Duo.Samples solution
Expand the Xamarin.Forms folder and ensure the DualScreenDemos.Android project is the startup project
Start the Surface Duo emulator - once it has started it will appear in the Visual Studio device list
Run the project, and you will see a menu of different examples to try:
The TwoPaneView playground lets you experiment with the different layout options it supports. Read the TwoPaneView docs for details on how to control the layout.
- Open the Xamarin.Duo.Samples solution
- Expand the Xamarin.Android native folder
- Choose one of the projects listed as the startup project (eg. Companion Pane, DragAndDrop, DualView, ExtendCanvas, IntentToSecondScreen, MasterDetail, TwoPage)
- Start the Surface Duo emulator - once it has started it will appear in the Visual Studio device list
- Run the project
- Change the startup project to try each sample
To use the DualView and ExtendCanvas samples, you will first need to create an Google Map API key. Follow the instructions outlined here to create an API key.
After you have an API key, put it in the following files:
YOUR_API_KEY string with your actual key the map views will be displayed.
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.