Currently I am using the follow code to check whether SwipeRefreshLayout should be enabled.
private void laySwipeToggle() {
if (mRecyclerView.getChildCou
To find out if the RecyclerView is scrolled to bottom, you could reuse the methods used for the scrollbar.
This is the calculation, for convenience written as a Kotlin extension function:
fun RecyclerView.isScrolledToBottom(): Boolean {
val contentHeight = height - (paddingTop + paddingBottom)
return computeVerticalScrollRange() == computeVerticalScrollOffset() + contentHeight
}