コード例 #1
0
        void CreateRecyclerView()
        {
            _recyclerView        = new ScrollRecyclerView(Android.App.Application.Context);
            _recyclerView.Touch += _recyclerView_Touch;
            var scrollListener = new GridViewScrollListener(Element, _recyclerView);

            _recyclerView.AddOnScrollListener(scrollListener);

            _recyclerView.SetItemAnimator(null);
            _recyclerView.HorizontalScrollBarEnabled = false;
            _recyclerView.VerticalScrollBarEnabled   = true;

            _adapter = new GridViewAdapter(Element.ItemsSource, _recyclerView, Element, Resources.DisplayMetrics);
            _recyclerView.SetAdapter(_adapter);

            UpdateGridLayout();
        }
コード例 #2
0
 public GridViewScrollListener(FormsGridView gridView, ScrollRecyclerView recyclerView)
 {
     _gridView     = gridView;
     _recyclerView = recyclerView;
 }