Foldable and multi-screen devices have been slowly but surely permeating the fringes of mainstream smartphone markets. This charge has been led mainly by Samsung, Microsoft and to a lesser degree Motorola. These trailblazing devices come in different form factors, and which ones will be successful is still very much open for debate. However the end result is giving users more screen real estate while boosting productivity and multimedia consumption.
Microsoft has shown us what is possible with their first party apps like Outlook, Word, Excel and others. They also collaborated with third parties to ensure some popular apps worked well with this new dual screen form factor. There is still work to be done, but things are in a much better place.
For months and even still today some apps on devices like the Surface Duo fall into three categories. Apps that are optimized for dual screen devices, apps that simply work and look OK, and apps that are difficult to use or sometimes no usable at all when spanned across both screens. Here we are going to talk about how to ensure your Android application at the very least falls into the “OK” category.
Google has updated a variety of dual-screen and foldable packages to release candidate, including Window Manager, SlidingPaneLayout, Navigation, and Preference. On the Microsoft Surface Duo and other foldable devices, these components can be leveraged to create unique user experiences or at the very least make sure your app behaves properly when spanned across both screens on a dual or multi screen device.
First up, Window Manager enables you to keep track of layout changes generated by folding a device. This in turn allows you to adjust and respond to the change accordingly to ensure a continued good user experience. For example if your app is spanned across two screens you might have a hamburger menu expanded, but as the user proceeds to close their device leaving just one screen active you might want to have that menu collapse to increase the amount of usable real estate.
Next on our list is the Jetpack Navigation component. The latest version 2.4.0 brings with it dual screen and large screen awareness. It handles large single screen and multi-screen scenarios beautifully. As better said by Cesar Valiente – Senior Software Engineer from Microsoft’s Surface Duo Dev Experience Team.
On single-screen devices, single-screen mode on Surface Duo, or multi-window mode on other foldable devices, we go from A to B destinations showing independent panes at a time (B overlaps A when visible). But on spanned mode on foldables or large-screen devices with more display area, we can now go from A to B destinations showing both at the same time (showing two panes).
Cesar Valiente, Senior Software Engineer, Surface Duo Experience
There are other improvements for large single screen and multi-screen foldable devices included in recent releases of Jetpack Preference version 1.20 as well as Sliding Pane Layout version 1.0.0 which is actually leveraged both in Navigation and Preference components. To learn more about these new features head over to the Windows App Development portal for dual screen and foldable devices.
If you want to get hands on with some samples based on what we talked about here today check out the Surface Duo Window Manager Samples GitHub Repository.
Before you get started, it might be a good idea to do the following.
What do you think about the progress being made by Google, Microsoft and the open source community on their journey to supporting large single and multi-screen foldable devices? Sound off in the comments below!