How to check if a RecyclerView is scrollable, ie, there are items below/above the visible area
RecyclerView
I have a dropdown in my recycler view which works by using
In Kotlin you can do :
fun isRecyclerScrollable(): Boolean { val layoutManager = recyclerView.layoutManager as LinearLayoutManager val adapter = recyclerView.adapter return if (adapter == null) false else layoutManager.findLastCompletelyVisibleItemPosition() < adapter.itemCount - 1 }