public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view                     = base.OnCreateView(inflater, container, savedInstanceState);
            transactionsList         = view.FindViewById <MvxListView>(Resource.Id.transactions_list);
            scoreImage               = view.FindViewById <ImageView>(Resource.Id.score_image);
            collectionBackgroundView = view.FindViewById <View>(Resource.Id.collection_background_view);
            view.FindViewById <Button>(Resource.Id.see_em_button).Click  += (s, e) => { (Activity as MainActivity).SetRequiredCurrentTab(2); };
            view.FindViewById <Button>(Resource.Id.do_more_button).Click += (s, e) => { (Activity as MainActivity).SetRequiredCurrentTab(3); };
            var bottomBackgroundLayout = view.FindViewById <LinearLayout>(Resource.Id.bottom_white_background);

            transactionsList.Adapter = new TransactionsAdapter(this.Activity, (IMvxAndroidBindingContext)BindingContext, transactionsList, bottomBackgroundLayout);
            scrollView   = view.FindViewById <LockableScrollView>(Resource.Id.scrollView);
            scrollHelper = new PointsScrollHelper(scrollView, false, GetType());
            UpdateControls();

            scrollView.ScrollChange += async(s, e) =>
            {
                OnScrollViewChanged(s, e);
                if (scrollView.GetChildAt(0).Height - scrollView.Height <= scrollView.ScrollY)
                {
                    if (!ViewModel.IsLoadingMore && !ViewModel.IsBusy)
                    {
                        await ViewModel.LoadMoreTransactions();
                    }
                }
            };
            return(view);
        }
Exemple #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);
        }
Exemple #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view                     = base.OnCreateView(inflater, container, savedInstanceState);
            leaderboardList          = view.FindViewById <MvxListView>(Resource.Id.leaderboard_list);
            tvOverall                = view.FindViewById <TextView>(Resource.Id.tv_overall);
            tvRanked                 = view.FindViewById <TextView>(Resource.Id.tv_ranked);
            userPhoto                = view.FindViewById <MvxAppCompatImageView>(Resource.Id.user_photo);
            collectionBackgroundView = view.FindViewById <View>(Resource.Id.collection_background_view);
            view.FindViewById <Button>(Resource.Id.earn_button).Click += (s, e) => {
                (Activity as MainActivity).SetRequiredCurrentTab(3);
            };
            adapter = new LeaderboardAdapter(this.Activity, (IMvxAndroidBindingContext)BindingContext, leaderboardList);
            leaderboardList.Adapter = adapter;
            UpdateControls();
            scrollView               = view.FindViewById <LockableScrollView>(Resource.Id.scrollView);
            scrollHelper             = new PointsScrollHelper(scrollView, false, GetType());
            scrollView.ScrollChange += (s, e) =>
            {
                OnScrollViewChanged(s, e);
            };

            return(view);
        }