Skip to content

Set of libraries that help you to build dual screen experiences for Microsoft Surface Duo

License

Notifications You must be signed in to change notification settings

microsoft/surface-duo-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Surface Duo SDK

This repo contains the source code for the Microsoft Surface Duo SDK.

Please read the code of conduct and contribution guidelines.

Getting Started

When importing the code into Android Studio, use the surface-duo-sdk folder as the base directory of the project. This lets you access the sdk source code and run the sdk samples from within the same project.

Add to your project

  1. Make sure you have mavenCentral() repository in your top level build.gradle file:

    allprojects {
        repositories {
            google()
            mavenCentral()
         }
    }
  2. Add dependencies to the module-level build.gradle file (current version may be different from what's shown here). There are multiple libraries available - for some of them you should reference ScreenManager plus any additional libraries you plan to use:

    ScreenManager

    If you want to choose the version that uses Display Mask API, then you should add the following lines to your gradle file.

    implementation "com.microsoft.device.dualscreen:screenmanager-displaymask:1.0.0-beta4"

    or if you want to choose the version that uses Window Manager API, then you should add the following lines.

    implementation "com.microsoft.device.dualscreen:screenmanager-windowmanager:1.0.0-beta4"

    Bottom navigation

    implementation "com.microsoft.device.dualscreen:bottomnavigation:1.0.0-beta5"

    Fragments handler

    implementation "com.microsoft.device.dualscreen:fragmentshandler:1.0.0-beta5"

    Layouts

    implementation "com.microsoft.device.dualscreen:layouts:1.0.0-beta9"

    Tabs

    implementation "com.microsoft.device.dualscreen:tabs:1.0.0-beta5"

    RecyclerView

    implementation "com.microsoft.device.dualscreen:recyclerview:1.0.0-beta6"

    Ink

    implementation "com.microsoft.device:ink:1.0.0-alpha5"

    Foldable Navigation Component

    def nav_version = "1.0.0-alpha3"
    
    // Java language implementation
    implementation "com.microsoft.device.dualscreen:navigation-fragment:$nav_version"
    implementation "com.microsoft.device.dualscreen:navigation-ui:$nav_version"
    
    // Kotlin
    implementation "com.microsoft.device.dualscreen:navigation-fragment-ktx:$nav_version"
    implementation "com.microsoft.device.dualscreen:navigation-ui-ktx:$nav_version"

    SnackbarContainer

    implementation "com.microsoft.device.dualscreen:snackbar:1.0.0-alpha2"

    Testing

    implementation "com.microsoft.device.dualscreen.testing:testing-kotlin:1.0.0-alpha4"

Useful links

Samples that utilize this SDK

Other Surface Duo developer samples