Flex mode

Figure : Google duo in flex mode

When your phone is partially folded, it will go into Flex Mode. Apps will reorient to fit the screen, letting you send messages or watch videos without holding the phone. For example, you can set the phone somewhere flat, like on a table, and use the bottom half of the screen to navigate. Unfold the phone to use the apps in a full screen mode, and partially fold it again to return to Flex Mode.

For making it easier to bring Flex mode to more third-party service, Samsung and Google worked closely together to redesign the app from the operating system level. Integrating Flex mode to Android Support Library was one of the examples, supporting apps and users to take full advantage of differentiating experience on foldable devices.

New Jetpack WindowManager Library in Android

Jetpack WindowManager library provides information about two physical properties of foldable devices — display features and device state.

• WindowManager Jetpack library to 1.0.0 stable version has been released
• Update 1.0.0 stable or higher version in your app
• The primitive version(1.0.0-alpha) may be incompatible with the new platform(12L and higher)

Folding features

Each display feature area can be characterized by its bounding rectangle in the window coordinate space and its type.

public interface FoldingFeature : DisplayFeature {
    public val bounds: Rect
    public val state: FoldingFeature.State
    public val orientation: Orientation
    public val occlusionType: OcclusionType
    public val isSeparating: Boolean
}
Copy
change color theme



Galaxy Z Flip series Galaxy Z Fold series
Portrait
Landscape

Until now, Samsung foldables are in the form of TYPE_FOLD.

Device states

The figure below shows each state of foldables. For Flex mode, the app should be redesigned proper layout when POSTURE_HALF_OPENED state.


How do I use it?

Find out more on: Support New Form Factors with the new Jetpack WindowManager Library