Skip to content

Commit 5d6af59

Browse files
committed
Moves the drag handle to the end of the row in the Measurement Type settings screen, placing it after the edit and visibility buttons. This provides a more conventional and intuitive layout for list item actions, see issue #1227
1 parent e28baf5 commit 5d6af59

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

android_app/app/src/main/java/com/health/openscale/ui/screen/settings/MeasurementTypeSettingsScreen.kt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,6 @@ fun MeasurementTypeSettingsScreen(
188188
color = textColor
189189
)
190190

191-
// Drag handle for reordering
192-
IconButton(
193-
modifier = Modifier.draggableHandle(), // Provided by the reorderable library
194-
onClick = {} // onClick is typically handled by the reorderable mechanism
195-
) {
196-
Icon(
197-
Icons.Default.DragHandle,
198-
contentDescription = dragHandleContentDesc
199-
)
200-
}
201191
// Edit button
202192
IconButton(onClick = { onEditType(type.id) }) {
203193
Icon(
@@ -214,6 +204,18 @@ fun MeasurementTypeSettingsScreen(
214204
)
215205
}
216206
}
207+
208+
// Drag handle for reordering
209+
IconButton(
210+
modifier = Modifier.draggableHandle() // Provided by the reorderable library
211+
.padding(start = 8.dp), // ensure small padding for separation
212+
onClick = {} // onClick is typically handled by the reorderable mechanism
213+
) {
214+
Icon(
215+
Icons.Default.DragHandle,
216+
contentDescription = dragHandleContentDesc
217+
)
218+
}
217219
}
218220
}
219221
}

0 commit comments

Comments
 (0)