Microsoft Releases Dual-Screen Layout Control Preview for Android Devs

Posted on March 28, 2020 by Paul Thurrott in Android, Dev, Microsoft Surface, Mobile with 3 Comments

Microsoft has released a preview version of a dual-screen layout control for Java and Kotlin developers targeting Surface Duo.

“The dual-screen layout control and associated helpers will enable you to build dynamic and responsive apps that take advantage of the Microsoft Surface Duo and its two screens,” Microsoft’s Craig Dunn writes.

The dual-screen layout control builds on Microsoft’s Display Mask API, which is used on Surface Duo to determine what’s happening in areas of the screens that are not used for displaying your app’s content. It includes three elements:

SurfaceDuoLayout. A control that helps manage single-screen and dual-screen layouts in a flexible way.

SurfaceDuoScreenManager. A way to subscribe to screen mode changes and have your app respond accordingly.

ScreenHelper. Provides information about the screen and hinge to help you position elements in your UI.

SurfaceDuoLayout works like a set of two containers when the app is used in span mode and one container in single-screen mode, Microsoft says. The firm offers sample code in both Java and Kotlin.

Tagged with

Join the discussion!

BECOME A THURROTT MEMBER:

Don't have a login but want to join the conversation? Become a Thurrott Premium or Basic User to participate

Register
Comments (4)

4 responses to “Microsoft Releases Dual-Screen Layout Control Preview for Android Devs”

  1. Avatar

    Ron Diaz

    I’m sure developers are just chomping at the bit to develop custom apps for this hardware... </s>

Leave a Reply