Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recyclerview get item by screen position x/y

Is it somehow possible to get an item of a recyclerview at a specific screen position (x and y coordinate)?

like image 702
André Avatar asked Oct 25 '25 19:10

André


1 Answers

You can get View of an item at specific coordinates with this method findChildViewUnder.

View itemView = recyclerView.findChildViewUnder(x, y);
like image 115
Vladimír Bielený Avatar answered Oct 27 '25 08:10

Vladimír Bielený



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!