Colton Idle
03/17/2024, 9:48 PMoverlayView = ComposeView(context).apply {
setContent {
Text("Overlay Text", Modifier.padding(16.dp))
}
}
val windowManager = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager
windowManager.addView(overlayView, params)
with ViewTreeLifecycleOwner not found
but if I do the same code from View land then no crash. (view system code inside 🧵 ) let me know if compose just has some weird restrictions where it can't draw like that.Colton Idle
03/17/2024, 9:49 PMoverlayView = LinearLayout(context).apply {
orientation = LinearLayout.VERTICAL
gravity = Gravity.CENTER
addView(textView)
}
Ben Trengrove [G]
03/17/2024, 10:12 PMBen Trengrove [G]
03/17/2024, 10:13 PMbrandonmcansh
03/17/2024, 10:16 PMColton Idle
03/17/2024, 10:23 PMMark Murphy
03/17/2024, 10:38 PMColton Idle
03/18/2024, 1:01 AMbrandonmcansh
03/18/2024, 1:03 AMColton Idle
03/18/2024, 1:08 AMbrandonmcansh
03/18/2024, 1:31 AMbrandonmcansh
03/18/2024, 1:35 AMColton Idle
03/18/2024, 1:38 AMbrandonmcansh
03/18/2024, 1:38 AM