It turns out, that the head item in SLC is a Row composable with all child elements having no explicit heights defined. The head item adopts the height to the other items in SLC.
As I tried to fill head item with half of MaxHeight in Row composable, it doesn’t work as I imagined using
.fillMaxHeight(0.5f)
ScalingLazyColumn(...) {
item {
Row( modifier = Modifier
.fillMaxWidth()
.fillMaxHeight(0.5f)
) {
Text(text = "head text")
...
It does work after I set an explicit size of a child element of Row composable in the head item.
ScalingLazyColumn(...) {
item {
Row( modifier = Modifier
.fillMaxWidth()
) {
Text(modifier = Modifier
.size(24.dp),
text = "head text")
...
Thanks for the hint to put border and spacers in SLC, it does help me to see the structure better in preview tool. The Layout Inspector doesn’t really help IMO to debug, if the structure gets complicated.