KeyFlow LogoKEYLOW
BETA v2v2026.05.02
HomeTrendingRecentSeries
Tools & Info
Tools & AppsAbout
Your Account
Reading History
Home
Trending
Recent
Menu
[Compose] Modifier.clickable { } 에 대한 고찰(부제: 터치 이벤트 전달) | 이지훈 | KeyFlow
KeyFlow LogoKEYLOW
BETA v2v2026.05.02
[Compose] Modifier.clickable { } 에 대한 고찰(부제: 터치 이벤트 전달)

[Compose] Modifier.clickable { } 에 대한 고찰(부제: 터치 이벤트 전달)

이지훈이지훈
3 days ago(Edited)
9 min read

Modifier.clickable이 모든 터치를 완벽하게 막아줄 것이라는 착각, WebView를 만나는 순간 깨집니다.

Jetpack Compose와 AndroidView(WebView)를 혼용하며 터치 이벤트 전파 문제를 겪는 안드로이드 개발자
·Modifier.clickable은 Main Pass에서 동작하므로 Initial Pass에서 이벤트를 전달하는 AndroidView의 동작을 막을 수 없음
·AndroidViewHolder는 pointerInteropFilter를 통해 Initial Pass 시점에 MotionEvent를 자식 View로 즉시 포워딩함
·완벽한 터치 차단을 위해서는 pointerInput을 사용하여 Initial Pass 단계에서 명시적으로 이벤트를 consume해야 함
이지훈

이지훈

@easyhooon

Was this helpful?Your support means a lot to the author.