コード例 #1
0
ファイル: BrowsePage.cs プロジェクト: Xandroid4Net/CEI
        private void InitTopRatedRecyclerView()
        {
            topRatedManager = new LinearLayoutManager(Activity, LinearLayoutManager.Horizontal, false);
            topRated.SetLayoutManager(topRatedManager);
            topRatedAdapter = new ItemAdapter(viewModel.GetCachedTopRated());
            topRated.SetAdapter(topRatedAdapter);
            var topRatedScrollListener = new ItemAdapterScollListener(topRatedManager);

            topRatedScrollListener.LoadMore += async delegate()
            {
                if (!viewModel.CanLoadMoreTopRated())
                {
                    return;
                }
                await viewModel.GetTopRated().ConfigureAwait(false);
            };
            topRated.AddOnScrollListener(topRatedScrollListener);
        }