Jetpack Compose on Surface Duo
Jetpack Compose is the new UI toolkit for Android. You can follow the setup instructions on developer.android.com to set up your project to start using Jetpack Compose.
A UI component that helps you build two-pane layouts for dual-screen, foldable, and large-screen devices.
Jetpack Window Manager
These Jetpack Compose samples all use Jetpack Window Manager APIs to detect folding features and adapt the layout accordingly.
For more information on how to use Window Manager in your Compose application, check out this article on Jetpack Window Manager for Compose.