title: Inserting items manually when using FirestorePagingAdapter
body: <p>I am using FirestorePagingAdapter to list images from Firestore Database. I want to insert native Ad objects into the list before setting it to Recycler view so that Ads will be placed in between images. I already have the code to create native ads and insert them into the list. But since I am using FirestorePagingAdapter, how can I modify the list before setting it to RecyclerView.</p>
  
  <pre><code>    Query query = db.collection("Wallpapers")
                          .whereEqualTo("category", mCategoryName).orderBy("uploadedDate", Query.Direction.DESCENDING);
  
          PagedList.Config config = new PagedList.Config.Builder()
                          .setEnablePlaceholders(false)
                          .setPrefetchDistance(2)
                          .setPageSize(10)
                          .build();
  
  
                  FirestorePagingOptions&lt;WallpaperResponse&gt; firestorePagingOptions = new FirestorePagingOptions.Builder&lt;WallpaperResponse&gt;()
                          .setLifecycleOwner(this)
                          .setQuery(query, config, WallpaperResponse.class)
                          .build();
  
                  firestorePagingAdapter = new FirestorePagingAdapter&lt;WallpaperResponse, WallpaperViewHolder&gt;(firestorePagingOptions){
  
                              @NonNull
                              @Override
                              public WallpaperViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) {
                                  switch (viewType) {
                                 /* case NATIVE_AD_VIEW_TYPE:
                                      View unifiedNativeLayoutView = LayoutInflater.from(
                                              viewGroup.getContext()).inflate(R.layout.native_ad,
                                              viewGroup, false);
                                      return new NativeAdViewHolder(unifiedNativeLayoutView);*/
                                      case WALLPAPER_ITEM_VIEW_TYPE:
                                          // Fall through.
                                      default:
                                          View menuItemLayoutView = LayoutInflater.from(viewGroup.getContext())
                                                  .inflate(R.layout.fragment_wallpapers_item_grid, viewGroup, false);
                                          return new WallpaperViewHolder(menuItemLayoutView);
                                  }
                              }
  
                              @Override
                              protected void onBindViewHolder(@NonNull WallpaperViewHolder holder, int position, @NonNull WallpaperResponse model) {
                                  loadingView.setVisibility(View.GONE);
                                  int viewType = getItemViewType(position);
                                  switch (viewType) {
                              /*case NATIVE_AD_VIEW_TYPE:
                                  UnifiedNativeAd unifiedNativeAd = (UnifiedNativeAd) mWallpapers.get(position);
                                  populateNativeAdView(unifiedNativeAd, ((NativeAdViewHolder) holder).getAdView());
                                  break;*/
                                      case WALLPAPER_ITEM_VIEW_TYPE:
                                          // fall through
                                      default:
                                          holder.favAnimation.setVisibility(View.GONE);
                                          holder.mode.setVisibility(View.GONE);
                                          holder.author.setVisibility(View.GONE);
                                          WallpaperHelper wallpaperHelper = new WallpaperHelper();
                                 ImageLoader.getInstance().displayImage(model.getThumbUrl(), new ImageViewAware(holder.image),
                                                  mOptions.build(), new SimpleImageLoadingListener() {
                                                      @Override
                                                      public void onLoadingStarted(String imageUri, View view) {
                                                          super.onLoadingStarted(imageUri, view);
                                                          int color;
                                                      }
  
                                                      @Override
                                                      public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                                                          super.onLoadingComplete(imageUri, view, loadedImage);
                                                      }
                                                  }, null);
  
                                  }
  
                                  holder.card.setOnClickListener(v -&gt; {
  
                                  });
                              }
                          };
  
  firestorePagingAdapter.notifyDataSetChanged();
          mRecyclerView.setAdapter(Utils.getAnimationAdapter(firestorePagingAdapter));
  
  
       private void insertAdsInWallpaperItems() {
              if (unifiedNativeAds.size() &lt;= 0) {
                  return;
              }
  
              int offset = (wallpaperList.size() / unifiedNativeAds.size()) + 1;
              int index = 0;
              for (UnifiedNativeAd ad : unifiedNativeAds) {
                  if(index != 0){
                      wallpaperList.add(index, ad);
                  }
                  index = index + offset;
              }
          }
  </code></pre>