Repository navigation
Conversation
|
I opened #246 and have the Fold8 this is about. One more thing this limit blocks, which makes the fix a bit more pressing:
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 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. |
…e for its height counts as phone-shaped (fixes SimonSchubert#246)
Mohsintl
force-pushed
the
fix/foldable-two-pages
branch
from
November 19, 2026 08:28
4cf5a3f to
1882371
Compare
…Rail.kt beside it, so it compiles after the ui/home move
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a Galaxy Z Fold8's inner screen, home showed one wide page instead of two.
unfoldedShapeonly 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-pagessetting) could handle the Fold8 instead. I kept this PR to the limit change.The shape check is now
isUnfoldedShape(window, halfWidth), a plain function besideisCoverScreen, so it can be tested without Compose.UnfoldedShapeTestcovers:With the old 0.65 limit, only the Fold8 test fails.
Closes #246
./gradlew :owl:test :app:testDebugUnitTest :owl:owlJar :app:assembleDebug :app:lintDebugpassesUnfoldedShapeTest(6) andCoverScreenTestpass, and:owl:owlJarand:app:lintDebugpass.mainhere: symlink tests inPhoneFoldersTest,GuestFsTestandThemeDirsTest, the shell-script tests inAgentsTest,GpuTest, and the time zone and timing tests inLangTest.assembleDebug(no NDK or proot here). The change is Kotlin only, and it compiles.