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); }
public void Reload() { ViewPagerAdapter._views.Clear(); _mainViewPager.RemoveAllViewsInLayout(); _mainPagerAdapter.AddView(_nonAdminDashboardContentInstance.GetView(0, null, null)); _mainPagerAdapter.AddView(_gamificationContentInstance.GetView(0, null, null)); _mainPagerAdapter.NotifyDataSetChanged(); }
public void Reload() { ViewPagerAdapter._views.Clear(); _mainViewPager.RemoveAllViewsInLayout(); _mainPagerAdapter.AddView(_adminDashboardContentInstance.GetView(0, null, null)); _allocateButton = _adminDashboardContentInstance.GetAllocateButton(); _mainPagerAdapter.AddView(_allocationPageInstance.GetView(0, null, null)); _allocateButton.Click += allocateButtonClickAction; _mainPagerAdapter.NotifyDataSetChanged(); }
protected async override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Principal); //Android.Widget.Toolbar toolbar = FindViewById<Android.Widget.Toolbar>(Resource.Id.toolbar); //SetActionBar(toolbar); tabLayout = FindViewById <Android.Support.Design.Widget.TabLayout>(Resource.Id.tabs); viewPager = FindViewById <ViewPager>(Resource.Id.pager); viewPagerAdapter = new ViewPagerAdapter(SupportFragmentManager); viewPager.Adapter = viewPagerAdapter; tabLayout.SetupWithViewPager(viewPager); await IniciaProcessos(); salasFragment = new SalasFragment(); viewPagerAdapter.AddFragment(salasFragment, GetString(Resource.String.salas_proximas)); viewPagerAdapter.AddFragment(new Android.Support.V4.App.Fragment(), GetString(Resource.String.conversas)); viewPagerAdapter.AddFragment(new Android.Support.V4.App.Fragment(), GetString(Resource.String.notificacoes)); viewPagerAdapter.NotifyDataSetChanged(); }