protected override void InitBindings()
        {
            InitDrawer();
            Bindings.Add(
                this.SetBinding(() => ViewModel.Loading,
                                () => LoadingSpinner.Visibility).ConvertSourceToTarget(Converters.BoolToVisibility));

            Pivot.Adapter = new ClubsIndexPagerAdapter(FragmentManager, _rightDrawer);
            TabStrip.SetViewPager(Pivot);
            TabStrip.CenterTabs();
            Pivot.SetCurrentItem(_lastPivotIndex, false);

            Pivot.AddOnPageChangeListener(new OnPageChangedListener(i => _lastPivotIndex = i));
        }
示例#2
0
        protected override void InitBindings()
        {
            Pivot.OffscreenPageLimit = 3;
            Pivot.Adapter            = new ClubDetailsPagerAdapter(FragmentManager);
            TabStrip.SetViewPager(Pivot);
            TabStrip.CenterTabs();
            if (_lastIndex == null)
            {
                _lastIndex = 1;
            }

            Pivot.SetCurrentItem(_lastIndex.Value, false);

            Bindings.Add(
                this.SetBinding(() => ViewModel.Loading,
                                () => LoadingSpinner.Visibility).ConvertSourceToTarget(Converters.BoolToVisibility));

            Pivot.AddOnPageChangeListener(new OnPageChangedListener(i => _lastIndex = i));
        }