Yingding Wang
12/30/2022, 12:15 AMyschimke
12/30/2022, 1:02 AMyschimke
12/30/2022, 1:03 AMYingding Wang
12/30/2022, 9:58 AM.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.yschimke
12/30/2022, 10:02 AMfillParentMaxHeight
it's from ScalingLazyListItemScope.Yingding Wang
12/30/2022, 10:10 AMyschimke
12/30/2022, 10:11 AMYingding Wang
12/30/2022, 10:16 AM.height(IntrinsicSize.Min)
, .fillMaxHeight(0.5f)
to get some relativ height from SLC and its items max height.
The fillParentMaxHeight
also doesn’t work, it just fill more height than fillMaxHeight(0.5f)
yschimke
12/30/2022, 10:33 AMYingding Wang
12/30/2022, 10:47 AMfillParentMaxHeight
from ScalingLazyListItemScope actually does work. In my case the parent height of SLC item seams to be the screen height. I need to calc the relative fraction differently.
fillParentMaxHeight(0.15f)
does the trick.yschimke
12/30/2022, 10:48 AM