Repository navigation
feat(android): native DuoGeometryView, Kotlin tests, and Android e2e - #31
Merged
Merged
Conversation
- DuoGeometryView uses the native environment view on Android too, so nested views see the fold in their own coordinates. The view refreshes on ancestor scroll and global layout, and reports only the system-bar insets that overlap it. - Pure conversions move to RNDuoFoldGeometry with JVM unit tests (hinge status, region kind, view-local frames, insets, size classes); CI's Android job runs them. - @ReactProp on includeInactiveRegions silences "Could not find generated setter". - Android Maestro flow plus `yarn example e2e:android`, which sets the emulator hinge angle and checks the Hinge lab flat and half-open. - ESLint ignores android/build; Android test sources stay out of the npm package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CAWRESTLER
enabled auto-merge (squash)
October 8, 2026 21:47
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.
Summary
Finishes the Android foldable support started in 0.1.0 and closes the Android gaps listed in its release notes.
Native
DuoGeometryViewon AndroidDuoGeometryViewis already the native environment view wrapped around the content. Android now uses the same component (src/native/NativeDuoGeometryView.tsx), backed by the Android environment view from feat(android): foldable posture, fold regions, and fold-aware arrangements #27. Nested views see the fold in their own coordinates.ViewTreeObserver), because scrolling moves a view without re-laying it out. It reports only the system-bar insets that overlap the view, instead of the whole window's.Kotlin unit tests
RNDuoFoldGeometry, which has no Android framework dependencies: hinge status, region kind, view-local frames, overlapping insets, and size classes. They have 8 JVM unit tests, and CI's Android job runs them.Smaller fixes
@ReactProponincludeInactiveRegionssilences the "Could not find generated setter" warning in logcat.safeAreaInsetsnow cover only the system bars that overlap the provider.android/build/, where Gradle puts its HTML test report. Android test sources stay out of the npm package.example/.gitignorenow ignores only the generated/android/and/ios/folders, rather than every folder with those names, so.maestro/android/is tracked.Android end-to-end
example/.maestro/android/hinge.yamlplusyarn example e2e:android. The script sets the emulator's hinge angle withadb emu sensor set hinge-angle0and checks the Hinge lab flat and half-open. It works on both wide (sidebar) and compact (menu) layouts.Testing
DuoGeometryViewreports 1 active division region at x −20, y −260, w 0, h 700, local to the card. Its y value tracks scrolling.yarn example e2e:androidpasses flat and half-open.DuoArrangementViewstacks its panes above and below it.yarn validatepasses (77 Jest tests, 59 tooling tests, lint 0 errors,pack:check).Emulator caveats
mDeviceState=UNKNOWN), so WindowManager keeps calling its fold flat even at 90°. The package deliberately trusts WindowManager's posture over the raw hinge sensor, so the clamshell shows "Fully open" there. The half-open posture was verified on the Pixel Fold. Physical foldable hardware is still untested.🤖 Generated with Claude Code