Add tutorial on how to implement gesture controlls
This commit is contained in:
parent
57dda5ae8e
commit
84d9e0349c
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user