public void CreateList (string name) { SetProgressBarIndeterminateVisibility (true); var list = new List { Name = name }; DB.InsertAsync (list).ContinueWith (t => { SetProgressBarIndeterminateVisibility (false); AddListTab (list, select: true); }, uiScheduler); }
private ActionBar.Tab AddListTab (List list, bool select) { var listTab = ActionBar.NewTab(); listTab.SetText (list.Name); listTab.SetTag (list.Id); ListFragment existing = (ListFragment)FragmentManager.FindFragmentByTag (list.Id.ToString()); listTab.SetTabListener (new TabListener<ListFragment> (this, list.Id.ToString(), existing)); ActionBar.AddTab (listTab, select); return listTab; }
private ActionBar.Tab AddListTab (List list) { return AddListTab (list, false); }