title: Xamarin Android onScrollListener is being called more than once
body: <p>I want to create an infinite scrolling RecyclerView in my application. It consumes a web service and brings some CardView items on screen. Here's is the simplified code I have so far, without inculding the RecyclerView creation etc.</p>
  
  <p><strong>Main.cs</strong></p>
  
  <pre><code>protected override void OnCreate(Bundle bundle)
      {
          base.OnCreate(bundle);
  
          var categoryLayoutManager = new LinearLayoutManager(this);
          categoryList.SetLayoutManager(categoryLayoutManager);
          var onScrollListener = new OnScrollListener(categoryLayoutManager);
  
          onScrollListener.LoadMoreEvent += (object sender, EventArgs e) =&gt;
          {
              Console.WriteLine("Last");
          };
      }
  </code></pre>
  
  <p><strong>OnScrollListener.cs</strong></p>
  
  <pre><code>public class OnScrollListener : RecyclerView.OnScrollListener
  {
      public delegate void LoadMoreEventHandler(object sender, EventArgs e);
      public event LoadMoreEventHandler LoadMoreEvent;
  
      private LinearLayoutManager LayoutManager;
  
      public OnScrollListener(LinearLayoutManager layoutManager)
      {
          LayoutManager = layoutManager;
      }
  
      public override void OnScrolled(RecyclerView recyclerView, int dx, int dy)
      {
          base.OnScrolled(recyclerView, dx, dy);
  
          var visibleItemCount = recyclerView.ChildCount;
          var totalItemCount = recyclerView.GetAdapter().ItemCount;
          var pastVisiblesItems = LayoutManager.FindFirstVisibleItemPosition();
  
          if ((visibleItemCount + pastVisiblesItems) &gt;= totalItemCount)
          {
              LoadMoreEvent(this, null);
          }
      }
  }
  </code></pre>
  
  <p>Currently, when scrolling down to the last item, my scroller is called more than once, so it brings more items than needed.
  I want my Listener to be called once, fetch the items, then be able to be called again when the new last item is visible. Is it posible with the current code I have? Thank you.</p>