onScrollEnd: RecyclerViewExt.OnScrollEnd? ) { addOnScrollListener(object : RecyclerView.OnScrollListener() ... override fun onScrolled(recyclerView: RecyclerView?, dx: onScrolled?.onScrolled(recyclerView, dx, dy) val llm = layoutManager as? LinearLayoutManager ... // BOTTOM llm?.let { val visibleItemCount = it.childCount val totalItemCount = it.itemCount val pastVisibleItems = it.findFirstVisibleItemPo if (pastVisibleItems + visibleItemCount >= total onScrollEnd?.onScrollEnd() 27