使 AndroidView 将触摸事件传播到底层 Composable

oky*_*elt 13 android android-view android-jetpack-compose

具有以下布局,是否可以使Button(或下的任何其他视图AndroidView)接收触摸事件,即使AndroidView覆盖整个屏幕?我能够使其与两个Composables 或两个老式Views 一起使用,但不能与 aComposable和 a一起使用View

@Composable
fun SomeScreen() {
    Box(
        contentAlignment = Alignment.Center,
        modifier = Modifier.fillMaxSize()
    ) {
        Button(
            onClick = {}
        ) {
            Text(text = "Button")
        }
        AndroidView(
            viewBlock = {
                View(it).apply {
                    setBackgroundResource(android.R.color.transparent)
                    layoutParams = ViewGroup.LayoutParams(
                        ViewGroup.LayoutParams.MATCH_PARENT,
                        ViewGroup.LayoutParams.MATCH_PARENT
                    )
                }
            }
        )
    }
}
Run Code Online (Sandbox Code Playgroud)