Foldables at Google I/O
Hello Android developers!
You’ve probably seen some of the awesome announcements made this week at Google I/O, a virtual event that brought the Google developer community together. This post covers some of our favorites, from sessions like What’s new in foldables, tablets, and large screens, and Prepare your app for large screens. Enhancing apps for dual-screens and Microsoft Surface Duo falls naturally into a broader strategy to support larger screens, and we’re excited to see foldable device enhancements going mainstream.
Jetpack Window Manager is a common API for all foldables that provides easy access to information about the location and state of hinges or folds on a variety of devices, including Surface Duo.
We have provided instructions to get started with Window Manager; you can also check out the Android Reference for more details, release information for API version history, and Codelabs for a step-by-step walkthrough using Window Manager.
Google announced these widgets can now be fold-aware:
- SlidingPaneLayout – covered in last week’s blog, the SlidingPaneLayout has been updated to adapt for fold state and dual-screen devices.
- NavigationRail – a new widget similar to BottomNavigation for positioning on the side of the screen to work better on foldable and larger screens.
- ConstraintLayout – now includes the ability to use a fold by setting a ReactiveGuide to the fold position (in code) to build adaptive layouts for dual-screen devices.
Microsoft also has a set of controls available that adapt to dual-screen and foldable devices, including layouts, a recyclerview helper, tabs, and navigation. Microsoft’s controls are also based on Window Manager and can be used to enhance apps for other foldable devices beyond the Surface Duo.
Google’s UI guidance for large screens has been updated to cover foldables, as well as Material Design, and both can be read in conjunction with the Surface Duo Design Kit. Following the design guidance and responsive grids from Google will work equally well for your dual-screen user experiences.
There’s more information on the latest updates to the Surface Duo design kit and docs coverage on our blog.
Flutter 2.2 was announced with many new features and updates.
The Material Design team has also made the NavigationRail widget available for Flutter, which can be added to apps for Surface Duo.
The Surface Duo Developer Experience team continues to work on our dual-screen Flutter contributions, and welcomes your feedback.