[andr][replay] Handle hybrid AndroidViews inside Compose #126
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.
This took an embarrassingly long time to figure out, but after following the rabbit hole in https://github.com/androidx/androidx/blob/48f6421f6615572456ee94984209cd110a4694d4/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/accessibility/android_a11y_implementation_notes.md#androidview-children I realized that the Compose LayoutNode has an (internal) reference to the legacy AndroidView if it exists.
In the example below we're creating an hybrid view via:
capture-sdk/platform/jvm/gradle-test-app/src/main/java/io/bitdrift/gradletestapp/ComposeScreen.kt
Lines 82 to 91 in f6edcc1