Add tutorial on how to implement gesture controlls

This commit is contained in:
Isaac Shoebottom 2022-12-08 13:28:16 -04:00
parent 57dda5ae8e
commit 84d9e0349c

View File

@ -22,6 +22,8 @@ class CompressingAdapter(private val mCompressingItems: MutableList<CompressingI
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val compressingItemView = val compressingItemView =
LayoutInflater.from(parent.context).inflate(R.layout.item_compressing, parent, false) LayoutInflater.from(parent.context).inflate(R.layout.item_compressing, parent, false)
// Use gesture controls to swipe to delete
// Reference here: https://www.tutorialspoint.com/how-to-detect-swipe-direction-between-left-right-and-up-down-in-android
return ViewHolder(compressingItemView) return ViewHolder(compressingItemView)
} }