public PilotListCounterFragment(string title, PilotListAdapter pilotList, Activity parent)
     : base()
 {
     mTitle = title;
     mPilotList = pilotList;
     mParent = parent;
 }
Пример #2
0
        protected override void OnCreate(Bundle savedInstance)
        {
            base.OnCreate(savedInstance);
            SetContentView(R.Layouts.OnlinePilotsActivity_Layout);

            this.ActionBar.NavigationMode = ActionBar.NAVIGATION_MODE_TABS;
            this.ActionBar.SetDisplayHomeAsUpEnabled(true);

            solrainAdapter = CreateTab("Solrain", true);
            quantarAdapter = CreateTab("Quantar", false);
            octaviusAdapter = CreateTab("Octavius", false);

            var pilotList = LastNonConfigurationInstance as PilotList;
            if (pilotList != null)
            {
                PopulatePilotLists(pilotList);
                _savedInstance = pilotList;
            }
            else
            {
                RefreshPilotList();
            }
        }
Пример #3
0
        PilotListAdapter CreateTab(string title, bool makeCurrent)
        {
            PilotListAdapter adapter = new PilotListAdapter(this);
            PilotListCounterFragment fragment = new PilotListCounterFragment(title + " online", adapter, this);

            var tab = this.ActionBar.NewTab();
            tab.SetText(title);
            tab.SetTabListener(this);
            tab.SetTag(fragment);
            this.ActionBar.AddTab(tab);

            if (makeCurrent == true)
            {
                currentTab = fragment;
            }

            return adapter;
        }