forked from androidx/androidx
-
Notifications
You must be signed in to change notification settings - Fork 108
Support overlay placement for interop views #2501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
MatkovIvan
reviewed
Oct 22, 2025
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/platform/UIKitTextInputService.uikit.kt
Show resolved
Hide resolved
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt
Outdated
Show resolved
Hide resolved
...e/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropProperties.uikit.kt
Outdated
Show resolved
Hide resolved
...e/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropProperties.uikit.kt
Outdated
Show resolved
Hide resolved
MatkovIvan
reviewed
Oct 22, 2025
...se/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropContainer.uikit.kt
Outdated
Show resolved
Hide resolved
mazunin-v-jb
approved these changes
Oct 22, 2025
MatkovIvan
reviewed
Oct 22, 2025
...i/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropElementHolder.uikit.kt
Outdated
Show resolved
Hide resolved
...i/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropElementHolder.uikit.kt
Outdated
Show resolved
Hide resolved
...e/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropProperties.uikit.kt
Outdated
Show resolved
Hide resolved
...se/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropContainer.uikit.kt
Outdated
Show resolved
Hide resolved
...se/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropContainer.uikit.kt
Outdated
Show resolved
Hide resolved
...e/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropProperties.uikit.kt
Outdated
Show resolved
Hide resolved
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/UserInputView.uikit.kt
Show resolved
Hide resolved
svastven
reviewed
Oct 22, 2025
...src/uikitInstrumentedTest/kotlin/androidx/compose/ui/interop/UIKitInteropInstrumentedTest.kt
Show resolved
Hide resolved
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt
Show resolved
Hide resolved
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt
Outdated
Show resolved
Hide resolved
...se/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropContainer.uikit.kt
Outdated
Show resolved
Hide resolved
...se/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropContainer.uikit.kt
Show resolved
Hide resolved
MatkovIvan
approved these changes
Oct 23, 2025
svastven
approved these changes
Oct 23, 2025
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.
Add the
placedAsOverlayAPI flag to theUIKitInteropPropertiesto allow interopUIKitViewandUIKitViewControllerto be placed on top of the Compose drawing canvas. This change enables interop views with a transparent background or a background with a native shader effect to be used. To support this, theUserInputViewclass has been split into two:BackgroundInputViewandOverlayInputView, which handle touches for interop views located below and above the Metal canvas, respectively.Update the tests that use
UIKitViewandUIKitViewControllerto test interop views for both placement types.Fixes: https://youtrack.jetbrains.com/issue/CMP-9114/Support-Overlay-flag-for-UIKitView
Testing
Full input regression is required. The minimal test should include testing of:
Release Notes
Features - iOS
UIKitInteropProperties.placedAsOverlayflag, which allows to place interop views above the Compose canvas. This allows interop views with a transparent background or shader effect to be used.