Last active
February 3, 2020 21:13
-
-
Save aggarwalpulkit596/04ac0a2880b9577333874709f80cf9df to your computer and use it in GitHub Desktop.
ItemDetailsLoopup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyItemDetailsLookup(private val recyclerView: RecyclerView) : | |
ItemDetailsLookup<String>() { | |
override fun getItemDetails(event: MotionEvent): ItemDetails<String>? { | |
val view = recyclerView.findChildViewUnder(event.x, event.y) | |
if (view != null) { | |
return (recyclerView.getChildViewHolder(view) as NotesAdapter.ItemViewHolder).getItemDetails() | |
} | |
return null | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment