private UISwipeActionsConfiguration createDisabledActionConfiguration() { var swipeAction = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] {}); swipeAction.PerformsFirstActionWithFullSwipe = false; return(swipeAction); }
public override UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var markTaskAsCompleteAction = MarkTaskAsCompleteAction(tableView, indexPath); var leadingSwipe = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] { markTaskAsCompleteAction }); leadingSwipe.PerformsFirstActionWithFullSwipe = true; return(leadingSwipe); }
public override UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var doneAction = ContextualDoneAction(indexPath.Row); var leadingSwipe = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] { doneAction }); leadingSwipe.PerformsFirstActionWithFullSwipe = true; return(leadingSwipe); }
public override UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var definitionAction = ContextualDefinitionAction(indexPath.Row); var flagAction = ContextualFlagAction(indexPath.Row); var leadingSwipe = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] { flagAction, definitionAction }); leadingSwipe.PerformsFirstActionWithFullSwipe = false; return(leadingSwipe); }
public override UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var editAction = contextualEditAction(indexPath.Row, tableView); var deleteAction = contexttualDeleteAction(indexPath, tableView); var leadingSwipe = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] { editAction, deleteAction }); leadingSwipe.PerformsFirstActionWithFullSwipe = false; return(leadingSwipe); }
public override UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var action = GetAction(tableView, indexPath); var leadingSwipe = UISwipeActionsConfiguration.FromActions(new[] { action }); leadingSwipe.PerformsFirstActionWithFullSwipe = true; return(leadingSwipe); }
public override UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var deleteAction = contextualDeleteAction(indexPath, tableView); var trailingSwipe = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] { deleteAction }); trailingSwipe.PerformsFirstActionWithFullSwipe = true; return(trailingSwipe); }
public override UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { UIContextualAction codeAction = ContextualCodeAction(indexPath.Row); UIContextualAction xibAction = ContextualXibAction(indexPath.Row); UISwipeActionsConfiguration leadingSwipe = UISwipeActionsConfiguration .FromActions(new UIContextualAction[] { codeAction, xibAction }); leadingSwipe.PerformsFirstActionWithFullSwipe = false; return(leadingSwipe); }
public override UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var cAction = clearAction(indexPath.Row); var dAction = duplicateAction(indexPath.Row); var leadingSwipe = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] { cAction, dAction }); leadingSwipe.PerformsFirstActionWithFullSwipe = false; return(leadingSwipe); }
private UISwipeActionsConfiguration createDisabledActionConfiguration() { if (!UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) { return(null); } var swipeAction = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] {}); swipeAction.PerformsFirstActionWithFullSwipe = false; return(swipeAction); }
private UISwipeActionsConfiguration createSwipeActionConfiguration( Func <LogItemViewModel, UIContextualAction> factory, NSIndexPath indexPath) { var item = ModelAt(indexPath); if (item == null) { return(null); } return(UISwipeActionsConfiguration.FromActions(new[] { factory(item) })); }
public override UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var deleteAction = UIContextualAction.FromContextualActionStyle( UIContextualActionStyle.Destructive, "Delete", async(contextualAction, view, success) => { await DeleteTodoItem(indexPath); success(true); }); return(UISwipeActionsConfiguration.FromActions(new[] { deleteAction })); }
private UISwipeActionsConfiguration createSwipeActionConfiguration( Func <LogItemViewModel, UIContextualAction> factory, NSIndexPath indexPath) { if (!UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) { return(null); } var item = ModelAt(indexPath); if (item == null) { return(null); } return(UISwipeActionsConfiguration.FromActions(new[] { factory(item) })); }
public override UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { if (!UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) { return(null); } var item = GetItemAt(indexPath); if (item == null) { return(null); } return(UISwipeActionsConfiguration .FromActions(new[] { continueSwipeActionFor((TimeEntryViewModel)item) })); }
public override UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { if (!UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) { return(null); } var item = collection[indexPath.Section][indexPath.Row]; if (item == null) { return(null); } return(UISwipeActionsConfiguration .FromActions(new[] { deleteSwipeActionFor(item) })); }
public override UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { if (!UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) { return(null); } var item = DisplayedItems[indexPath.Section][indexPath.Row]; if (item == null) { return(null); } return(UISwipeActionsConfiguration .FromActions(new[] { continueSwipeActionFor(item) })); }
public override UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var delete = UIContextualAction.FromContextualActionStyle(UIContextualActionStyle.Destructive, "X", (action, sourceView, completionHandler) => { _customListView.NotifyDeleteItemSelected(indexPath.Section); completionHandler(true); }); var reduce = UIContextualAction.FromContextualActionStyle(UIContextualActionStyle.Normal, "-1", (action, sourceView, completionHandler) => { _customListView.NotifyReduceQuantitySelected(indexPath.Section); completionHandler(true); }); reduce.BackgroundColor = UIColor.FromRGB(95, 95, 95); delete.BackgroundColor = UIColor.Red; var swipeAction = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] { delete, reduce }); swipeAction.PerformsFirstActionWithFullSwipe = false; return(swipeAction); }
public override UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var checkInAlertActionTitle = _restaurantsMO[indexPath.Row].IsVisited ? AppResources.UndoCheckIn : AppResources.CheckIn; var checkInAction = UIContextualAction.FromContextualActionStyle( UIContextualActionStyle.Normal, checkInAlertActionTitle, (Check_in, sourceView, completionHandler) => { var cell = tableView.CellAt(indexPath) as RestaurantTableViewCell; if (cell != null) { cell.OnCheckInClicked(); } }); checkInAction.BackgroundColor = UIColor.FromRGB(0, 190, 0); checkInAction.Image = _restaurantsMO[indexPath.Row].GetCheckInImage(); var swipeconfiguration = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] { checkInAction }); return(swipeconfiguration); }
public override UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration(UITableView tableView, NSIndexPath indexPath) { var deleteAction = UIContextualAction.FromContextualActionStyle( UIContextualActionStyle.Destructive, AppResources.Delete, (Delete, sourceView, completionHandler) => { var restaurantId = _restaurantsMO[indexPath.Row].Id; _dataBaseConnection.Conn.Table <RestaurantMO>().Delete(x => x.Id == restaurantId); _restaurantsMO.RemoveAt(indexPath.Row); TableView.ReloadData(); PrepareNotification(); SetEmptyTableViewBackground(); completionHandler(true); }); var shareAction = UIContextualAction.FromContextualActionStyle( UIContextualActionStyle.Normal, AppResources.Share, (Share, sourceView, completionHandler) => { var activityItems = _restaurantsMO[indexPath.Row].GetActivityItems(); var activityController = new UIActivityViewController(activityItems, null); SetUpPopover(activityController, tableView.CellAt(indexPath)); PresentViewController(activityController, true, null); completionHandler(true); }); deleteAction.BackgroundColor = UIColor.FromRGB(231, 76, 60); deleteAction.Image = UIImage.FromBundle("delete"); shareAction.BackgroundColor = UIColor.FromRGB(254, 149, 38); shareAction.Image = UIImage.FromBundle("share"); var swipeConfiguration = UISwipeActionsConfiguration.FromActions(new UIContextualAction[] { deleteAction, shareAction }); return(swipeConfiguration); }