Ejemplo n.º 1
0
        public void OnTabSelected(SherlockActionBar.Tab tab, FragmentTransaction transaction)
        {
            DebugHelper.WriteDebugEntry("In IntroActivity OnTabSelected(): " + tab.Tag);
            _currentTabTag = (String)tab.Tag;

            switch (_currentTabTag)
            {


                case "track":
                    RenderTrackItTabFragment(transaction);
                    break;

                case "report":
                    if (_reportFragment == null)
                    {
                        _reportFragment = new ReportCrueltyFragment();
                        transaction.Add(Resource.Id.fragmentContainer, _reportFragment, "report");
                    }
                    else
                    {
                        transaction.Show(_reportFragment);
                    }

                    if (_listToggleButton != null)
                    {
                        _listToggleButton.Visibility = ViewStates.Gone;
                    }

                    break;
            }

        }
Ejemplo n.º 2
0
        public void OnTabUnselected(SherlockActionBar.Tab tab, FragmentTransaction transaction)
        {
            DebugHelper.WriteDebugEntry("In IntroActivity OnTabUnselected()");
            var unselectedTabTag = (String)tab.Tag;

            switch (unselectedTabTag)
            {
                case "report":
                    if (_reportFragment != null)
                    {
                        transaction.Hide(_reportFragment);
                    }

                    break;

                case "track":
                case "fight":
                    if (_mapFragment != null)
                    {
                        transaction.Hide(_mapFragment);
                    }

                    if (_fightitFragment != null)
                    {
                        transaction.Hide(_fightitFragment);
                    }

                    break;


            }


        }
Ejemplo n.º 3
0
        public void OnTabReselected(SherlockActionBar.Tab tab, FragmentTransaction transaction)
        {
            _currentTabTag = (String)tab.Tag;

            switch (_currentTabTag)
            {
                case "track":
                    RenderTrackItTabFragment(transaction);
                    break;
            }
        }