Foldable Device (a folding device) is a class of mobile gadgets with a flexible display that changes form factor when folded and unfolded. Such devices work both as a compact phone and as a tablet — depending on the screen position. According to Android Developers (2025), the global foldable device market grew by 42% in 2024, and adapting applications for this form factor is becoming mandatory for large projects.
Key Takeaways
Foldable Device is a mobile device with a flexible OLED display capable of folding without damaging the matrix. When folded, such a device is compact and fits in a pocket; when unfolded, it provides a tablet-sized screen. The first mass-market foldable device was the Royole FlexPai (2018), but the category was popularized by the Samsung Galaxy Fold (2019) and Huawei Mate X.
The key difference between foldable devices and traditional ones is the presence of a hinge and a flexible display. When folding, the display does not break but bends along a radius determined by the hinge design. Modern technologies (UTG — Ultra Thin Glass, 2020+ and Samsung Infinity Flex) can withstand up to 200,000 folding cycles without visible damage.
For developers, foldable devices create three challenges: changes in screen size when unfolding, the presence of a crease, and operation in a half-open state (tabletop mode) when the device stands on a surface at an angle.
Book-style — Galaxy Z Fold, Google Pixel Fold, OnePlus Open. A cover screen for use when folded, an inner flexible display (inner screen) for tablet mode. The cover screen aspect ratio is about 22:9, the inner screen is about 6:5 or 4:3.
Flip-style — Galaxy Z Flip, Motorola Razr, Oppo Find N2 Flip. Vertical folding, an outer display for notifications (1.5–3.5 inches), an inner standard phone display (6.7–7 inches). The main feature is that when half-open (flex mode), the application can split the screen into two zones: controls on top, content on the bottom.
Dual-screen — Microsoft Surface Duo, Lenovo ThinkPhone. Two separate displays with a hinge in the middle. When unfolded, they form a common area but with a physical gap between the screens. The API considers the hinge angle and allows the application to span across both screens.
Google provides Jetpack WindowManager for working with foldable devices. The API includes three key components: WindowLayoutInfo — information about the fold position, WindowPosture — the physical position of the device, and FoldingFeature — a description of the fold area: orientation, state, and angle.
FoldingFeature contains the fold type (hinge, fold), state (flat — open, half-opened, folded) and the fold angle (from 0 to 180 degrees). The angle is available on devices with an angle sensor (Galaxy Z Fold, Pixel Fold).
val windowInfoRepository =
WindowInfoTracker.getOrCreate(context)
windowInfoRepository.windowLayoutInfo(context)
.collect { layoutInfo ->
layoutInfo.displayFeatures
.filterIsInstance<FoldingFeature>()
.forEach { feature ->
// handle folding
}
}
To determine whether a device is foldable, use PackageManager.hasSystemFeature("android.hardware.sensor.hinge_angle"). This sensor is present on a device with a hinge — absent on regular phones.
Interface adaptation is the main task for a developer when supporting foldable devices. When unfolded, the window width can double, and the interface must restructure from a single-column to a multi-column layout. Use Window Size Class to switch between layouts — when unfolding, the class changes from Compact to Expanded.
Special attention should be paid to handling configuration changes. When a user unfolds the device, the Activity may be recreated. If the application does not save state, the user will lose entered data or scroll position. Use ViewModel for screen data and onSaveInstanceState for UI state.
For flex mode (tabletop mode), the design should split the screen into two functional zones. The top for content viewing (video, gallery, list), the bottom for controls (buttons, controllers, keyboard). This pattern is used in video players: YouTube on Galaxy Z Flip shows video on top, recommendations and buttons on the bottom.
Testing is one of the most challenging aspects of developing for foldable devices. Android Emulator allows simulating foldable devices using AVD with the "Foldable" configuration (inner 7.6-inch display, outer 4.6-inch display). The emulator supports switching between folded and unfolded states.
For testing in the emulator, ADB is used. The command adb shell am broadcast -a android.intent.action.VIEW -e mode expand unfolds the device, adb shell am broadcast -a android.intent.action.VIEW -e mode fold folds it. You can also change the fold angle in the emulator window.
Real testing on physical devices is recommended for checking the feel of the transition, hinge quality, and crease visibility. Main models for testing: Samsung Galaxy Z Fold 6 (book-style), Samsung Galaxy Z Flip 6 (flip-style), Google Pixel Fold, Motorola Razr 50.
Do not place critically important elements in the crease area. Buttons, input fields, and interactive elements should be located at least 24 dp from the crease line. The crease is an inherent property of flexible displays; its visibility decreases with each generation but does not disappear completely.
Use continuation instead of interruption. When unfolding, content should smoothly transition from the cover screen to the inner screen or expand across the entire area. Avoid loading a new Activity — use layout recalculation within the same screen. Jetpack WindowManager tracks changes and notifies the application via WindowLayoutInfo.
Consider the hinge angle for creative scenarios. In photo and video applications, the half-open position (90°) turns the device into a stand: the camera shoots, the bottom part of the screen shows the control panel. This scenario is especially popular in Samsung Camera and native applications.
Frequently Asked Questions
Check for PackageManager.FEATURE_SENSOR_HINGE_ANGLE. If true — the device is foldable with a hinge angle sensor. Additionally, check the DisplayFold API.
Subscribe to WindowInfoTracker.windowLayoutInfo(). When the FoldingFeature state changes, restructure the interface according to the Window Size Class and fold position.
Jetpack WindowManager works on API 14+. However, FoldingFeature.HALF_OPENED requires API 24+ (Android 7.0). The hinge angle data sensor is available on Android 10+.
No. Use Window Size Class and Layoutomization from Jetpack WindowManager. A single codebase with size class checks replaces separate resource layouts.
Most foldable devices have IP48 or IP58 protection — limited water resistance. Underwater, the flexible display may be damaged, so submersion is not recommended by manufacturers.
Summary
We will develop a mobile application turnkey
IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.
Read also