Пример #1
0
 private void SetupRecyClerView()
 {
     registeredPlayers         = Task.Run(async() => await GetAllPlayers()).Result;
     registeredPlayers         = registeredPlayers.OrderBy(p => p.points).Reverse().ToList();
     pointsListView            = FindViewById <ListView>(Resource.Id.list);
     adapter                   = new PointsAdapter(this, registeredPlayers);
     pointsListView.Adapter    = adapter;
     pointsListView.ItemClick += PointsListView_ItemClick;
 }
Пример #2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view       = base.OnCreateView(inflater, container, savedInstanceState);
            scoreImage = view.FindViewById <ImageView>(Resource.Id.score_image);
            var pointsList = view.FindViewById <MvxListView>(Resource.Id.points_list);

            collectionBackgroundView = view.FindViewById <View>(Resource.Id.collection_background_view);
            pointsAdapter            = new PointsAdapter(this.Activity, (IMvxAndroidBindingContext)BindingContext, pointsList);
            pointsList.Adapter       = pointsAdapter;
            GetScoreFill();
            UpdateControls();
            scrollView               = view.FindViewById <LockableScrollView>(Resource.Id.scrollView);
            scrollHelper             = new PointsScrollHelper(scrollView, false, GetType());
            scrollView.ScrollChange += (s, e) =>
            {
                OnScrollViewChanged(s, e);
            };
            return(view);
        }