toggle files checkbox when clicking them and add more space before checkbox
This commit is contained in:
parent
118b2c0be0
commit
431e5ba8f5
2 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue