Winson Chiu
04/05/2025, 4:48 PMWinson Chiu
04/05/2025, 4:50 PMval horizontal = (screenWidthDp - targetItemWidth) / 2
LazyColumn(contentPadding = PaddingValues(horizontal = horizontal)) {
//...
}
But this feels wrong, and it also seems slow to respond to resizing a desktop window. It does snap to the right width eventually, but it looks odd.Jonathan
04/05/2025, 6:23 PMModifier.padding(...)
with the horizontal margin you want before the scroll Modifier.verticalScroll(...)
will achieve what you want.