frank
06/11/2023, 1:13 AMCards
?
Wanted behavior: When Drag the mouse in a single-click, select only the Cards
not the content. Suggestions for this?
fun filesCard(files: List<Directory> = listOf(), onOpenDoc: (Path) -> Unit) {
Card (modifier = Modifier.fillMaxHeight(0.9f).fillMaxWidth()) {
LazyColumn(modifier = Modifier.fillMaxHeight()) {
items(files) {file ->
Card(
backgroundColor = Color(245, 238, 254),
shape = RoundedCornerShape(8.dp),
modifier = Modifier
.padding(vertical = 4.dp, horizontal = 4.dp)
.combinedClickable(
onClick = {
println("Clicked File!")
},
onDoubleClick = {
onOpenDoc(file.path)
}
)
) {
Row {
Column(modifier = Modifier.padding(start = 8.dp)
) {
Text(file.name, fontWeight = FontWeight.Bold, modifier = Modifier.fillMaxWidth())
Text("..\\${file.relativePath}")
}
}
}
}
}
}
}