I want to change the horizontalAlignment of particular child and remaining will use the same horizontalAlignment. Is this possible in Column?
For example, Column parent modifier use horizontalAlignment = Alignment.CenterHorizontally, and I want particular child modifier will be different horizontalAlignment.
Column( modifier = Modifier .padding(16.dp) .fillMaxSize() .verticalScroll(rememberScrollState()), horizontalAlignment = Alignment.CenterHorizontally, ) { ScreenImage() Description() if (viewModel.isBluetoothEnabled) { ScanDeviceList(scanDeviceList) } else { Warning() Spacer(modifier = Modifier.weight(1f)) TryAgainButtonView { tryAgainAction() } ButtonView { openSettingAction() } } } I want to change ScanDeviceList() to be different horizontalAlignment
@Composable fun ColumnScope.ScanDeviceList(scanDeviceList: List<ScanResult>) { Spacer(modifier = Modifier.height(20.dp)) AnimatedVisibility(scanDeviceList.isNotEmpty()) { Text( text = stringResource(R.string.vailable_device), ) } } Many Thanks