Esempio n. 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.NonAdminDashboardLayout);

            findAllElements();
            setAllStringConstants();

            _mainPagerAdapter      = new ViewPagerAdapter(this);
            _mainViewPager.Adapter = _mainPagerAdapter;
            _circlePageIndicator.SetViewPager(_mainViewPager);
            _circlePageIndicator.SetPageColor(Color.White);
            _circlePageIndicator.SetFillColor(new Color(255, 255, 255, 64));

            _nonAdminDashboardContentInstance = new NonAdminContentAdapter(this);
            _nonAdminContentView = _nonAdminDashboardContentInstance.GetView();

            _gamificationContentInstance = new GamificationViewAdapter(this);
            _gamificationView            = _gamificationContentInstance.GetView();

            _mainPagerAdapter.AddView(_nonAdminContentView);
            _mainPagerAdapter.AddView(_gamificationView);
            _mainPagerAdapter.NotifyDataSetChanged();

            var timer = new Timer();

            _dashbardGradientTask = new DashboardGradientTimerHelper(this);
            timer.Schedule(_dashbardGradientTask, 0, NumberConstants.DashboardGradientTransition.DashboardGradientTransitionLengthInMilliseconds);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.AdminDashboardLayout);
            findAllElements();

            _mainPagerAdapter      = new ViewPagerAdapter(this);
            _mainViewPager.Adapter = _mainPagerAdapter;
            _circlePageIndicator.SetViewPager(_mainViewPager);
            _circlePageIndicator.SetPageColor(Color.White);
            _circlePageIndicator.SetFillColor(CoreColorConverter.GetColor(ColorConstants.CirclePageIndicatorColor));

            _adminDashboardContentInstance = new AdminDashboardContentView(this);
            _adminDashboardContentView     = _adminDashboardContentInstance.GetView();
            _allocateButton = _adminDashboardContentInstance.GetAllocateButton();

            _allocationPageInstance = new AllocationPageView(this);
            _allocationPageView     = _allocationPageInstance.GetView();

            _mainPagerAdapter.AddView(_adminDashboardContentView);
            _mainPagerAdapter.AddView(_allocationPageView);
            _mainPagerAdapter.NotifyDataSetChanged();

            var timer = new Timer();

            _dashbardGradientTask = new DashboardGradientTimerHelper(this);
            timer.Schedule(_dashbardGradientTask, 0, NumberConstants.DashboardGradientTransition.DashboardGradientTransitionLengthInMilliseconds);
        }