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.

UI component

  • TwoPaneLayout

    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.

Compose samples

There are Compose samples available that demonstrate all the different design patterns and unique features of the Surface Duo, and also other foldable devices, using Jetpack Compose.