From c1b7221324e8e769dbc7c6829a4bb6e7527d5900 Mon Sep 17 00:00:00 2001 From: Friday Date: Fri, 5 Jun 2026 10:25:21 +0000 Subject: [PATCH] Make radio rows fully tappable (label + dot), not just the dot RadioGroup rows only responded to taps on the ~144px radio dot; tapping the label did nothing. Wrap each row in Modifier.selectable(role=RadioButton) with RadioButton(onClick=null) so the whole row is one accessible tap target. Verified on-device: tapping the 'Download only' label now selects it. --- .../kotlin/com/syncflow/ui/addpair/AddPairScreen.kt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/syncflow/ui/addpair/AddPairScreen.kt b/app/src/main/kotlin/com/syncflow/ui/addpair/AddPairScreen.kt index 6af5d3a..4583c0f 100644 --- a/app/src/main/kotlin/com/syncflow/ui/addpair/AddPairScreen.kt +++ b/app/src/main/kotlin/com/syncflow/ui/addpair/AddPairScreen.kt @@ -5,6 +5,8 @@ import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts import androidx.compose.animation.AnimatedVisibility import androidx.compose.foundation.clickable +import androidx.compose.foundation.selection.selectable +import androidx.compose.ui.semantics.Role import androidx.compose.foundation.layout.* import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.text.KeyboardOptions @@ -382,10 +384,17 @@ private fun RadioGroup( } options.forEach { option -> Row( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier + .fillMaxWidth() + .selectable( + selected = option == selected, + role = Role.RadioButton, + onClick = { onSelect(option) }, + ), verticalAlignment = Alignment.CenterVertically, ) { - RadioButton(selected = option == selected, onClick = { onSelect(option) }) + // onClick = null: the whole row handles selection (bigger tap target + a11y). + RadioButton(selected = option == selected, onClick = null) Text(itemLabel(option), style = MaterialTheme.typography.bodyMedium) } }