Exemplo n.º 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();
        }
Exemplo n.º 2
0
 public GroupedGridSpanSizeLookup(GridViewAdapter adapter, int spanCount)
 {
     _adapter   = adapter;
     _spanCount = spanCount;
 }