Skip to content

A Galaxy Z Fold8's inner screen shows two pages: a half up to 0.7 wide for its height counts as phone-shaped - #281

Open
Mohsintl wants to merge 2 commits into
SimonSchubert:mainfrom
Mohsintl:fix/foldable-two-pages
Open

Mohsintl wants to merge 2 commits into
SimonSchubert:mainfrom
Mohsintl:fix/foldable-two-pages

Conversation

@Mohsintl

Copy link
Copy Markdown

On a Galaxy Z Fold8's inner screen, home showed one wide page instead of two. unfoldedShape only counted a half as phone-shaped up to 0.65 width over height, and the Fold8's halves are 1224×1848 px, which is 0.662.

This raises the limit to 0.7. Other inner screens sit well inside it: Fold5 and Pixel Fold at 0.600, OnePlus Open at 0.538, Pixel 9 Pro Fold at 0.518. Tablets in landscape still get one page: 3:2 is 0.75 and 16:10 is 0.8.

One trade-off to look at: a 4:3 tablet in landscape has halves of 0.667, just as phone-shaped as a Fold8's, so it now gets two pages too. Going by shape alone, the two can't be told apart. If you'd rather keep 4:3 tablets on one page, the issue's other idea (a home.two-pages setting) could handle the Fold8 instead. I kept this PR to the limit change.

The shape check is now isUnfoldedShape(window, halfWidth), a plain function beside isCoverScreen, so it can be tested without Compose. UnfoldedShapeTest covers:

  • the Fold8
  • the other inner screens above
  • 16:10 and 3:2 tablets
  • phones upright and sideways
  • a Fold8-shaped screen whose halves are under 320 dp
  • an empty window

With the old 0.65 limit, only the Fold8 test fails.

Closes #246

  • ./gradlew :owl:test :app:testDebugUnitTest :owl:owlJar :app:assembleDebug :app:lintDebug passes
    • Run on Windows. UnfoldedShapeTest (6) and CoverScreenTest pass, and :owl:owlJar and :app:lintDebug pass.
    • The other failures are Windows-only. They fail the same way on main here: symlink tests in PhoneFoldersTest, GuestFsTest and ThemeDirsTest, the shell-script tests in AgentsTest, GpuTest, and the time zone and timing tests in LangTest.
    • I didn't run assembleDebug (no NDK or proot here). The change is Kotlin only, and it compiles.
  • Tried on a device or emulator: no, I don't have a foldable. The numbers come from the issue's owl-check preview and published panel sizes.
  • New UI text: none
  • OWL changes: none
  • Saved data, rootfs steps or launcher-written files: none

@j0elmiller

Copy link
Copy Markdown

I opened #246 and have the Fold8 this is about. One more thing this limit blocks, which makes the fix a bit more pressing: home.unfolded-layout (#259) does nothing on this phone either.

unfoldedScreen() in ui/home/SideRail.kt goes through the same unfoldedShape(window) check as showsTwoPages():

private fun unfoldedScreen(window: IntSize): Boolean = LauncherStyle.unfoldedLayout && unfoldedShape(window)

So with halves at 1224 / 1848 = 0.662, the inner screen never counts as unfolded. On 1.7.0 with home.unfolded-layout = true in style.toml, unfolding shows one stretched page from the main layout, and no [unfolded] section is ever written to home/layout.toml.

Raising the limit to 0.7 as this PR does should fix both the two-page view and the unfolded layout on the Fold8. Happy to try a build on the device if that helps get it merged.

@Mohsintl
Mohsintl force-pushed the fix/foldable-two-pages branch from 4cf5a3f to 1882371 Compare November 19, 2026 08:28
…Rail.kt beside it, so it compiles after the ui/home move
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unfolded foldable shows one page instead of two: half-screen aspect 0.662 is just over the 0.65 limit

2 participants