Namig Tahmazli
07/10/2021, 9:47 AMBoxWithConstraints
composable. The closure that is being passed to it gets called multiple times with the height being different values each times. There is no animation or no state that can cause it to be recomposed.
P.S. I am using 1.0.0-rc01
version of compose.
The code and stack trace in 🧵Namig Tahmazli
07/10/2021, 9:49 AMComposeView(requireContext()).apply {
layoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
setContent {
BoxWithConstraints(modifier = Modifier.fillMaxSize()) {
println("<<<<<<<Height ${constraints.maxHeight}")
println("<<<<<<<Width ${constraints.maxWidth}")
Box(modifier = Modifier.matchParentSize().background(Color.Cyan))
}
}
}
Stack trace:
I/System.out: <<<<<<<Height 1868
I/System.out: <<<<<<<Width 1080
I/System.out: <<<<<<<Height 2022
I/System.out: <<<<<<<Width 1080
I/System.out: <<<<<<<Height 1868
I/System.out: <<<<<<<Width 1080
I/System.out: <<<<<<<Height 2022
I/System.out: <<<<<<<Width 1080
I/System.out: <<<<<<<Height 1868
I/System.out: <<<<<<<Width 1080
Daniele Segato
07/10/2021, 1:15 PMtad
07/10/2021, 6:55 PMComposeView
Namig Tahmazli
07/11/2021, 6:57 AMNamig Tahmazli
07/11/2021, 7:07 AMDaniele Segato
07/11/2021, 8:50 AMJan Skrasek
09/23/2021, 7:35 AM