Partager via


Foldable concepts for UI tests

When working with foldable devices, there are a few concepts and terms that are helpful to know. This information makes it easier to understand what kinds of situations need to be addressed and tested when adding foldable support to apps.

Device types

All foldable devices have a physical fold or hinge, which enables the device display to change dynamically.

Some devices have two distinct screens separated by a physical hinge, like the Surface Duo:

Picture of the Surface Duo

When talking about all kinds of devices, here are some common terms we use:

Term Definition
Foldable Most general term, refers to any device that can fold
Dual-screen Type of foldable that has two separate screens
Single-screen Conventional device that has one small non-folding display
Large screen Device with a large display, can include foldables that are completely open

To read more about these devices and how to enhance your apps, check out these resources:

Folding features

When discussing folding features, here are some additional terms we use:

Term(s) Definition API reference
Display feature Most general term, refers to any unique display feature on a device DisplayFeature
Folding feature, fold Type of display feature that enables device to fold FoldingFeature
Hinge Type of fold that occludes content FoldingFeature with occlusionType FULL

To read more about folding features and their properties, check out the Jetpack Window Manager library.

Surface Duo display operations

Because the Surface Duo is a dual-screen device, users can choose which screen(s) an app should fill. To change how an app is displayed, there are several different gestures users can perform.

Operation Definition Example
Span Display an app on both screens Animation of span gesture on the Surface Duo emulator
Unspan Display an app on one screen Animation of unspan gesture on the Surface Duo emulator
Switch Change which screen an app is displayed on Animation of switch gesture on the Surface Duo emulator
Close Stop displaying an app Animation of close gesture on the Surface Duo emulator

Foldable display states

Although the operations above are specific to the Surface Duo, we sometimes borrow those terms to refer to display states on all foldables.

State Definition Synonyms
spanned When an app is displayed on both sides of a folding feature dual-screen, unfolded, open
unspanned When an app is only displayed on one side of a folding feature or on an outer screen single-screen, folded, closed

To read more about foldable display states and postures, check out these resources: