Extract overlap detection mechanism - #557
Conversation
Introduces OverlapAwareStyleProvider and generic background style tracking, correctly resolving overlap based on the dynamic interior bounds of the CameraX Preview.
There was a problem hiding this comment.
Code Review
This pull request introduces an overlap-aware styling mechanism for camera controls, allowing their background style to adapt dynamically based on their spatial overlap with the viewfinder. The feedback highlights a compilation error and style guide violation in the newly added unit tests, the need to explicitly provide the LocalOverlapTargetBounds in the production layout to prevent state-sharing bugs, and a request to add KDoc documentation to the new enum class.
07ab7a0 to
66585e4
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to dynamically adjust the background style of camera controls based on their spatial overlap with a target region, such as the viewfinder. It adds CameraControlBackgroundStyle, OverlapAwareStyleProvider, and associated CompositionLocals, along with Robolectric tests to verify the overlap logic. The feedback focuses on ensuring the unit tests are density-independent to prevent flakiness, restricting the visibility of the new components to internal per the repository style guide, adding parameter documentation to KDocs, and cleaning up unused imports.
…lve ActivityScenario manifest bindings
…i-test-manifest instead
This PR extracts the overlap detection logic into a generic component instead of tightly coupling it to CaptureLayout. Bounding box resolution is computed directly from PreviewDisplay, correctly representing inner viewfinder constraints.