Overview / Guide
Adapt to the device
Follow display changes and place Vertical Bars on supported devices.
Device adaptation is part of standard setup, including iPhone Duo support. The Foldable subscription supplies the initial layout and later changes; the resolver and theme apply the matching placement.
Read this chapter to understand the supported device and OS combinations or to customize layout. Ordinary devices retain Web layout when native rail placement is not supported.
From the device report to Web layout
Foldable reports display changes. resolveVerticalBarsLayout reads the report and returns edge, inset and toolbarTop in viewport CSS pixels. setVerticalBarsLayout applies those values through the theme. Subscribe before reading the initial layout so startup and later changes use the same update function. Native control projection is handled separately by Native UI.
Let the reported layout decide
An edge of null restores ordinary Web layout. Use the reported geometry instead of guessing from the device name, screen width or foldable status. Web spacing and native rail availability are distinct: a browser preview can validate spacing, while native rail rendering needs a supported device and OS. Check both rail edges, rotation, display changes and return to ordinary layout.