diff --git a/storage/lib/src/main/java/org/calyxos/backup/storage/ui/restore/FilesAdapter.kt b/storage/lib/src/main/java/org/calyxos/backup/storage/ui/restore/FilesAdapter.kt index ba63fbcd..7fab5683 100644 --- a/storage/lib/src/main/java/org/calyxos/backup/storage/ui/restore/FilesAdapter.kt +++ b/storage/lib/src/main/java/org/calyxos/backup/storage/ui/restore/FilesAdapter.kt @@ -80,12 +80,12 @@ internal class FilesAdapter( R.drawable.ic_chevron_right } expandView.setImageResource(res) - itemView.setOnClickListener { - onExpandClicked(item) - } } else if (item is FileItem) { expandView.setImageResource(getDrawableResource(item)) - itemView.setOnClickListener(null) + } + itemView.setOnClickListener { + if (item is FolderItem) onExpandClicked(item) + else checkBox.toggle() } itemView.updatePadding(left = indentPadding * item.level) nameView.text = item.name diff --git a/storage/lib/src/main/res/layout/item_file.xml b/storage/lib/src/main/res/layout/item_file.xml index b9262f72..86508bbb 100644 --- a/storage/lib/src/main/res/layout/item_file.xml +++ b/storage/lib/src/main/res/layout/item_file.xml @@ -25,6 +25,7 @@ android:id="@+id/nameView" android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_marginEnd="8dp" android:textAppearance="?android:attr/textAppearanceListItem" app:layout_constraintEnd_toStartOf="@+id/checkBox" app:layout_constraintStart_toEndOf="@+id/expandView"