title: AdMob ads are not showing properly in recycler view
body: <p>I am trying to implement admob banner ads in recycler view I want to show banner ads after every recycler view item divisible by 2 my problem is when I am trying to implement condition ad is showing on 2nd position but replaced the recycler view item from that place why recycler view item is not showing on particular position where ads are showing.</p>
  
  <p>This is what I have done so far:</p>
  
  <pre><code>public class HomeBookAdapter extends RecyclerView.Adapter&lt;RecyclerView.ViewHolder&gt;{
  
  private static final int LAYOUT_ADS= 0;
  private static final int LAYOUT_BOOKS= 1;
  
  private ArrayList&lt;LoadHomeBooks&gt; list;
  private Context context;
  
  AdRequest adRequest;
  
  public HomeBookAdapter(ArrayList&lt;LoadHomeBooks&gt; list,Context context){
  
      this.list = list;
      this.context = context;
  }
  
  @Override
  public int getItemViewType(int position) {
  
      if(!(position == 0) &amp;&amp; position % 2 == 0){
  
          return LAYOUT_ADS;
      }else{
  
          return LAYOUT_BOOKS;
      }
  }
  
  @NonNull
  @Override
  public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
  
      View view =null;
      RecyclerView.ViewHolder viewHolder = null;
  
      if(viewType==LAYOUT_ADS)
      {
          view = LayoutInflater.from(parent.getContext()).inflate(R.layout.adview_layout,parent,false);
          viewHolder = new AdViewHolder(view);
      }
      else
      {
          view = LayoutInflater.from(parent.getContext()).inflate(R.layout.home_book_row,parent,false);
          viewHolder= new BookViewHolder(view);
      }
  
      return viewHolder;
  
  }
  
  @Override
  public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
  
      if(holder.getItemViewType() == LAYOUT_ADS){
  
          AdViewHolder adHolder = (AdViewHolder)holder;
  
          adRequest = new AdRequest.Builder().build();
          adHolder.mAdView.loadAd(adRequest);
  
      }else{
  
          BookViewHolder bookHolder = (BookViewHolder)holder;
  
          LoadHomeBooks model = list.get(position);
  
          final String bookId = model.getbUid();
          final String bookName = model.getbName();
          final String bookImage = model.getbImage();
          final String bookSub = model.getbSub();
          final String bookClass = model.getbClass();
          //User Id
          final String bId = model.getbId();
  
          RequestOptions requestOptions = new RequestOptions();
          requestOptions.placeholder(R.drawable.openbook);
  
          Glide.with(context).load(model.getbImage()).apply(requestOptions).into(bookHolder.homeBookImage);
  
          bookHolder.homeBookName.setText(model.getbName());
          bookHolder.homeSubject.setText(model.getbSub());
          bookHolder.homeClass.setText(model.getbClass());
  
        }
  }
  
  @Override
  public int getItemCount() {
      return list.size();
  }
  
  public class AdViewHolder extends RecyclerView.ViewHolder {
  
      AdView mAdView;
  
      public AdViewHolder(@NonNull View itemView) {
          super(itemView);
  
          mAdView = itemView.findViewById(R.id.mAdView);
      }
  }
  
  public class BookViewHolder extends RecyclerView.ViewHolder {
  
      TextView homeBookName,homeSubject,homeClass;
      ImageView homeBookImage;
  
      public BookViewHolder(@NonNull View itemView) {
          super(itemView);
  
          homeBookName = itemView.findViewById(R.id.homeBookName);
          homeSubject = itemView.findViewById(R.id.homeSubject);
          homeClass = itemView.findViewById(R.id.homeClass);
          homeBookImage = itemView.findViewById(R.id.homeBookImage);
  
      }
    }
  } 
  </code></pre>
  
  <p>Someone please let me know what I am doing wrong or what needs to be change to get desired result. Any help would be appreciated.</p>
  
  <p><strong>THANKS</strong> </p>