title: Displaying loading indicator with Paging Library
body: <p>I've implemented paging library with Room. I'm using Single Source of Truth. Articles (my data) will be fetched via Retrofit and will be inserted into Room database. Then recyclerview adapter listens for data via <strong>ArticleItemBoundaryCallback</strong>:</p>
  
  <pre><code>public class ArticleItemBoundaryCallback extends PagedList.BoundaryCallback&lt;ArticleModel&gt; {
  ArticleRepository repository;
  
  public ArticleItemBoundaryCallback(ArticleRepository repository) {
      this.repository =repository;
  }
  
  
  @Override
  public void onZeroItemsLoaded() {
      super.onZeroItemsLoaded();
      repository.getTenArticlesfromFirebaseAndRetrofit(1);
  }
  
  @Override
  public void onItemAtEndLoaded(@NonNull ArticleModel itemAtEnd) {
      super.onItemAtEndLoaded(itemAtEnd);
  
      int page=0;
      if (itemAtEnd.getPage() == 0) {
          page = itemAtEnd.getPage() + 2;
      } else {
          page = itemAtEnd.getPage()+1;
      }
  
     repository.getTenArticlesfromFirebaseAndRetrofit(page);
  
  }}
  </code></pre>
  
  <p>Repository decides if it needs to fetch data from internet or look for local cache (room database).</p>
  
  <p>But my problem is that there is no loading indicator at the end of my recyclerview. Users may not be sure if they reached end of the list or loading. 
  I saw <a href="https://github.com/android/architecture-components-samples/blob/master/PagingWithNetworkSample/lib/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/ui/PostsAdapter.kt" rel="noreferrer">this google code sample</a>
  but i couldn't find where they added loading view at. </p>