示例#1
0
        void SetupTab(string title, IListAdapter adapter, GameListFragment fragment)
        {
            var tab = this.ActionBar.NewTab();

            tab.SetTabListener(this);
            tab.SetText(title);
            this.ActionBar.AddTab(tab);
        }
示例#2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            this.RequestWindowFeature(WindowFeatures.Progress);
            this.RequestWindowFeature(WindowFeatures.IndeterminateProgress);
            SetProgressBarIndeterminate(true);
            SetProgressBarVisibility(true);

            this.ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
            this.ActionBar.Title          = "My Games";
            this.ActionBar.SetDisplayHomeAsUpEnabled(false);
            SetContentView(Resource.Layout.MyTrophiesLayout);

            myTurnFragment    = new GameListFragment();
            theirTurnFragment = new GameListFragment();
            completedFragment = new GameListFragment();

            ReloadList();

            SetupTab("My Turn", this.myTurnAdapter, this.myTurnFragment);
            SetupTab("Their Turn", this.theirTurnAdapter, this.theirTurnFragment);
            SetupTab("Completed", this.completedAdapter, this.completedFragment);
        }