public EndlessRecyclerViewScrollListener(LinearLayoutManager layoutManager, Binwell.Controls.FastCollectionView.FastCollection.FastCollectionView gridView, ScrollRecyclerView recyclerView)
 {
     _layoutManager = layoutManager;
     _gridView      = gridView;
     _recyclerView  = recyclerView;
     _density       = recyclerView.Resources.DisplayMetrics.Density;
 }
        void CreateRecyclerView()
        {
            _recyclerView = new ScrollRecyclerView(Application.Context);
            _recyclerView.SetClipToPadding(false);
            _adapter = new FastCollectionAdapter(Element.ItemsSource, _recyclerView, Element, Resources.DisplayMetrics,
                                                 this);
            LinearLayoutManager layoutManager;

            if (Element.IsHorizontal)
            {
                layoutManager =
                    new LinearLayoutManager(Context, OrientationHelper.Horizontal,
                                            false);     /*{AutoMeasureEnabled = true}*/
                _recyclerView.HasFixedSize = true;
            }
            else
            {
                _gridLayoutManager = new SmoothGridLayoutManager(Context, _columns > 0 ? _columns : 1,
                                                                 OrientationHelper.Vertical, false)
                {
                    RecyclerView = _recyclerView
                };
                _recyclerView.HasFixedSize = true;
                layoutManager = _gridLayoutManager;
                CalculateLayoutRects();
            }

            _recyclerView.SetLayoutManager(layoutManager);

            var scrollListener = new EndlessRecyclerViewScrollListener(layoutManager, Element, _recyclerView)
            {
                EnableLoadMore = Element.LoadMoreCommand != null
            };

            scrollListener.LoadMore += LoadMore;
            _recyclerView.AddOnScrollListener(scrollListener);
            _scrollListener = scrollListener;

            _recyclerView.HorizontalScrollBarEnabled = Element.IsHorizontal;
            _recyclerView.VerticalScrollBarEnabled   = !Element.IsHorizontal;

            _recyclerView.SetAdapter(_adapter);
        }