private void CreateTab(StationInventories.StationInventory station) { StationInventoryAdapter adapter = new StationInventoryAdapter(this); adapter.Update(station); StationInventoryListFragment fragment = new StationInventoryListFragment(adapter, this); var tab = this.ActionBar.NewTab(); tab.SetText(station.Name); tab.SetTabListener(this); tab.SetTag(fragment); switch (station.Faction) { case Factions.SOLRAIN: tab.SetIcon(R.Drawables.solrain); break; case Factions.QUANTAR: tab.SetIcon(R.Drawables.quantar); break; case Factions.OCTAVIUS: tab.SetIcon(R.Drawables.octavius); break; case Factions.HYPERIAL: tab.SetIcon(R.Drawables.hyperial); break; case Factions.AMANANTH: tab.SetIcon(R.Drawables.amananth); break; case Factions.UNREGULATED: tab.SetIcon(R.Drawables.tri); break; } this.ActionBar.AddTab(tab); }
public StationInventoryListFragment(StationInventoryAdapter inventory, Activity parent) : base() { mInventory = inventory; mParent = parent; }