Пример #1
0
        public void AddFargmentsTabbs()
        {
            try
            {
                Tabadapter.ClaerFragment();

                frgmanager = SupportFragmentManager;

                News_Feed_Tab     = new News_Feed_Fragment();
                Notifications_Tab = new Notifications_Fragment();
                Trending_Tab      = new Trending_Fragment();
                More_Tab          = new More_Fragment();

                if (Tabadapter != null && Tabadapter.Count <= 0)
                {
                    Tabadapter.AddFragment(News_Feed_Tab, GetText(Resource.String.Lbl_News_Feed));
                    Tabadapter.AddFragment(Notifications_Tab, GetText(Resource.String.Lbl_Notifcations));
                    Tabadapter.AddFragment(Trending_Tab, GetText(Resource.String.Lbl_Trending));
                    Tabadapter.AddFragment(More_Tab, GetText(Resource.String.Lbl_More));
                    viewPager.CurrentItem        = 3;
                    viewPager.OffscreenPageLimit = Tabadapter.Count;
                    viewPager.Adapter            = Tabadapter;
                    viewPager.PageScrolled      += ViewPager_PageScrolled;
                    viewPager.AddOnPageChangeListener(this);
                    SetTabStyle();

                    navigationTabBar.SetZ(5);
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
Пример #2
0
        private void SetUpViewPager(ViewPager viewPager)
        {
            try
            {
                MyProducts_Fragment_Tab = new MyProducts_Fragment();
                Market_Fragment_Tab     = new Market_Fragment();

                var adapter = new Main_Tab_Adapter(SupportFragmentManager);
                adapter.AddFragment(Market_Fragment_Tab, GetText(Resource.String.Lbl_Market));
                adapter.AddFragment(MyProducts_Fragment_Tab, GetText(Resource.String.Lbl_MyProducts));

                viewPager.CurrentItem = 2;

                viewPager.PageScrolled += ViewPager_PageScrolled;
                viewPager.Adapter       = adapter;
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
        private void SetUpViewPager(ViewPager viewPager)
        {
            try
            {
                SearchUser_Tab   = new SearchUser_Fragment();
                SearchPages_Tab  = new SearchPages_Fragment();
                SearchGroups_Tab = new SearchGroups_Fragment();

                var adapter = new Main_Tab_Adapter(SupportFragmentManager);
                adapter.AddFragment(SearchUser_Tab, GetText(Resource.String.Lbl_Users));
                adapter.AddFragment(SearchPages_Tab, GetText(Resource.String.Lbl_Pages));
                adapter.AddFragment(SearchGroups_Tab, GetText(Resource.String.Lbl_Groups));

                viewPager.PageSelected += ViewPagerOnPageSelected;
                viewPager.Adapter       = adapter;
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }