Ejemplo n.º 1
0
            public void OnTabSelected(TabLayout.Tab tab)
            {
                viewPager.SetCurrentItem(tab.Position, true);
                switch ((PagerAdapter.FragmentPosition)tab.Position)
                {
                case PagerAdapter.FragmentPosition.WorkPathFragment:
                    SetBackground(Resource.Color.tab1_actionbar_background, Resource.Color.tab1_tablayout_background, Resource.Color.tab1_tabindicator_background);
                    break;

                case PagerAdapter.FragmentPosition.WeldCountFragment:
                    SetBackground(Resource.Color.tab2_actionbar_background, Resource.Color.tab2_tablayout_background, Resource.Color.tab2_tabindicator_background);
                    break;

                case PagerAdapter.FragmentPosition.WeldConditionFragment:
                    SetBackground(Resource.Color.tab3_actionbar_background, Resource.Color.tab3_tablayout_background, Resource.Color.tab3_tabindicator_background);
                    break;

                case PagerAdapter.FragmentPosition.BackupPathFragment:
                    SetBackground(Resource.Color.tab4_actionbar_background, Resource.Color.tab4_tablayout_background, Resource.Color.tab4_tabindicator_background);
                    break;
                }
                var ir = (IRefresh)((PagerAdapter)viewPager.Adapter)[tab.Position];

                if (ir != null)
                {
                    ir.Refresh();
                }
            }
Ejemplo n.º 2
0
 public void OnTabUnselected(TabLayout.Tab tab)
 {
 }