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.
Our site uses cookies, including optional cookies to provide you with the best experience on our website and relevant advertising based on your use of our site, You can manage your preferences or accept all cookies.
You can also read our Privacy Policy and Cookie Policy.
Manage Your Cookies
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.