We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b59fb7 commit cb321adCopy full SHA for cb321ad
README.md
@@ -229,8 +229,14 @@ Use your adapter in an Activity or Fragment:
229
val adapter = YourAdapter()
230
binding.recyclerView.adapter = adapter
231
adapter.submitList(yourList)
232
-adapter.setOnItemClickListener {
233
- // Do something
+
+// `view` is the specific View within the item layout that was clicked.
234
+// This allows you to perform actions or access properties of the clicked View directly.
235
+adapter.setOnItemClickListener { item, view ->
236
+ // Do something with item or view
237
+}
238
+adapter.setOnItemLongClickListener { item, view ->
239
240
}
241
```
242
0 commit comments