private void SetupEditActionBar() { if (DarkMenuId == Resource.Menu.MainMenuEdit) { return; } ActionBar.TitleRaw = Resource.String.title_edit_task; ActionBar.RemoveAllActions(); var action = new MenuItemActionBarAction(this, this, Resource.Id.menu_cancel_save, Settings.UseLightIcons ? Resource.Drawable.ic_action_cancel : Resource.Drawable.ic_action_cancel_dark, Resource.String.menu_string_cancel) { ActionType = ActionType.Always }; ActionBar.AddAction(action); action = new MenuItemActionBarAction(this, this, Resource.Id.menu_save, Settings.UseLightIcons ? Resource.Drawable.ic_action_save : Resource.Drawable.ic_action_save_dark, Resource.String.menu_string_save) { ActionType = ActionType.Always }; ActionBar.AddAction(action); DarkMenuId = Resource.Menu.MainMenuEdit; MenuId = Resource.Menu.MainMenuEdit; m_AddButton.Visibility = ViewStates.Gone; ListView.Enabled = false; m_Editing = true; }
private void SetupDeleteActionBar() { if (DarkMenuId == Resource.Menu.MainMenuDelete) { return; } ActionBar.TitleRaw = Resource.String.title_delete_tasks; ActionBar.RemoveAllActions(); var action = new MenuItemActionBarAction(this, this, Resource.Id.menu_delete, Settings.UseLightIcons ? Resource.Drawable.ic_action_delete : Resource.Drawable.ic_action_delete_dark, Resource.String.menu_string_delete) { ActionType = ActionType.Always }; ActionBar.AddAction(action); action = new MenuItemActionBarAction(this, this, Resource.Id.menu_sort, Resource.Drawable.ic_menu_sort, Resource.String.menu_string_sort) { ActionType = ActionType.Never }; ActionBar.AddAction(action); action = new MenuItemActionBarAction(this, this, Resource.Id.menu_delete_all, Resource.Drawable.ic_menu_delete_all, Resource.String.menu_string_delete_all) { ActionType = ActionType.Never }; ActionBar.AddAction(action); action = new MenuItemActionBarAction(this, this, Resource.Id.menu_history, Resource.Drawable.ic_menu_history, Resource.String.menu_string_history) { ActionType = ActionType.Never }; ActionBar.AddAction(action); action = new MenuItemActionBarAction(this, this, Resource.Id.menu_about, Resource.Drawable.ic_menu_settings, Resource.String.menu_string_about) { ActionType = ActionType.Never }; ActionBar.AddAction(action); DarkMenuId = Resource.Menu.MainMenuDelete; MenuId = Resource.Menu.MainMenuDelete; m_AddButton.Visibility = ViewStates.Visible; ListView.Enabled = true; m_Editing = false; }
private void SetupMainActionBar() { ActionBar.RemoveAllActions(); var action = new MenuItemActionBarAction(this, this, Resource.Id.menu_share, Settings.UseLightIcons ? Resource.Drawable.ic_action_share : Resource.Drawable.ic_action_share_dark, Resource.String.menu_string_share_history) { ActionType = ActionType.Always }; ActionBar.AddAction(action); ActionBar.Title = ActionBar.Title + " - " + m_AllTasks.Count; DarkMenuId = Resource.Menu.HistoryMenu; MenuId = Resource.Menu.HistoryMenu; }