Beispiel #1
0
        private void InitPopularRecyclerView()
        {
            popularManager = new LinearLayoutManager(Activity, LinearLayoutManager.Horizontal, false);
            popular.SetLayoutManager(popularManager);
            popularAdapter = new ItemAdapter(viewModel.GetCachedPopular());
            popular.SetAdapter(popularAdapter);
            var popularScrollListener = new ItemAdapterScollListener(popularManager);

            popularScrollListener.LoadMore += async delegate()
            {
                if (!viewModel.CanLoadMorePopular())
                {
                    return;
                }
                await viewModel.GetPopular().ConfigureAwait(false);
            };
            popular.AddOnScrollListener(popularScrollListener);
        }