title: How to know whether a RecyclerView / LinearLayoutManager is scrolled to top or bottom?
body: <p>Currently I am using the follow code to check whether SwipeRefreshLayout should be enabled.</p>
  
  <pre><code>private void laySwipeToggle() {
      if (mRecyclerView.getChildCount() == 0 || mRecyclerView.getChildAt(0).getTop() == 0) {
          mLaySwipe.setEnabled(true);
      } else {
          mLaySwipe.setEnabled(false);
      }
  }
  </code></pre>
  
  <p>But here is the problem. When it's scrolled to another item's view's boundary <code>mRecyclerView.getChildAt(0).getTop()</code> also returns 0.</p>
  
  <p><img src="https://i.stack.imgur.com/f3eOu.gif" alt="The problem"></p>
  
  <p>Is there something like <code>RecyclerView.isScrolledToBottom()</code> or <code>RecyclerView.isScrolledToTop()</code>?</p>
  
  <p>EDIT: <code>(mRecyclerView.getChildAt(0).getTop() == 0 &amp;&amp; linearLayoutManager.findFirstVisibleItemPosition() == 0)</code> kind of does the <code>RecyclerView.isScrolledToTop()</code>, but what about <code>RecyclerView.isScrolledToBottom()</code>?</p>