Questions tagged [swipe]

A quick motion gesture across the touchscreen.

A quick motion gesture across a touchscreen.

2837 questions
19
votes
1 answer

ItemTouchHelper : Limit swipe width of ItemTouchHelper.SimpleCallBack on RecyclerView

I have successfully implemented swipe behavior and performed some actions with it. The problem now I have is I want to limit the swipe width when I swipe the item. Currently this is what is happening But I want to limit the swipe behaviour width…
viper
  • 1,836
  • 4
  • 25
  • 41
19
votes
8 answers

How to disable snackbar's swipe-to-dismiss behavior

Is there a way to prevent the user from dismissing a snackbar by swiping on it? I have an app that shows a snack bar during network login, I want to avoid it to be dismissed. According to Nikola Despotoski suggestion I've experimented both…
Paolone
  • 475
  • 1
  • 7
  • 16
19
votes
1 answer

Tutorial to implement the use of TabHost in Android 2.2 + ViewPager and Fragments

A short tutorial for people like me who had some trouble finding a way to implement TabHost and ViewPager, including page swiping with fingers and tab click to change pages. The shown solution is compatible with Android versions 2.2+. It includes…
18
votes
4 answers

UIContextualAction with destructive style seems to delete row by default

The problem I'm seeing is that when I create a UIContextualAction with .destructive and pass true in completionHandler there seems to be a default action for removing the row. If you create a new Master-Detail App from Xcode's templates and add…
Murray Sagal
  • 8,454
  • 4
  • 47
  • 48
17
votes
5 answers

How to avoid swipe to delete calling setEditing at the UITableViewCell

I know, that when I implement tableView:willBeginEditingRowAtIndexPath:and tableView:didEndEditingRowAtIndexPath:, a swipe-to-delete does not call setEditing:animated: at my UITableViewController (being the delegate of the UITableView). I have a…
Björn Landmesser
  • 953
  • 10
  • 26
17
votes
2 answers

add additional buttons in UITableView swipe

Currently I am using NSFetchedResultsController to handle tableviews. I am wondering is there any way to add additional buttons like the delete button in swipe operation? I am thinking about to subclass it. But find nothing relevant in help docs to…
AlexWei
  • 1,093
  • 2
  • 8
  • 32
17
votes
6 answers

Is it possible to produce continuous swipe action on the touchscreen, with adb, on Android?

I'm trying to reproduce swipe action, with the help of adb. Currently, this code works (for swipe) adb shell input touchscreen swipe 530 1420 530 1120 adb shell input touchscreen swipe 530 1120 830 1120 which is adb shell input touchscreen swipe…
Ocelot
  • 1,733
  • 4
  • 29
  • 53
17
votes
7 answers

Snapchat-like swipe navigation between views in Xcode 6 and Swift)

I've been trying to implement swipe navigation between View Controllers in my app using the Swipe Gesture Recognizer and embeded Navigation Controller, but it doesn't look even close to the Snapchat's nav. What would be the most efficient and…
narolski
  • 193
  • 1
  • 1
  • 11
17
votes
2 answers

How to change activity with left-right swipe

How to change activity with left-right swipe? I did not find the manual anywhere. Example:
Klara
  • 175
  • 1
  • 1
  • 4
16
votes
3 answers

ios simulator: simulate swipe and drag

I have a UIView within a UIScrollView. When i want to simulate the drag event on the UIView, swipe event on the UIScrollView is being triggered. As per the documentation , there isn't much of a difference between swipe and drag. Swipe 1- Place the…
Srisa
  • 967
  • 1
  • 7
  • 17
16
votes
3 answers

React Native Swipeable (Swipe to delete) not closing

I'm using Swipeable from React-Native-Gesture-Handler to incorporate swipe to delete on my page. When I press delete, the contact gets deleted however the swipeable remains open. I want it to close after it gets pressed but I can't seem to figure…
16
votes
2 answers

Swipe UITableViewCell without touch

As my title saying I want to swipe first row of UITableView left to right when user will come on that ViewController. In my ViewController I have one UITableView, each row have two button "More" and "Delete" action. Look at below code func…
Johnty
  • 195
  • 1
  • 11
16
votes
2 answers

how to implement both ontouch and also onfling in a same listview?

i have a listview and implemented onclick and also onfling.problem is when i do fling(swipe left to right), onclick event of listview is also getting executed.How to overCome this problem? how to differentiate touch(tap) and fling(swipe) in…
Ads
  • 6,681
  • 12
  • 47
  • 72
16
votes
3 answers

RecyclerView ItemTouchHelper swipe remove animation

I've got a remove on swipe, that draws a background (much like the Inbox app), implemented by an ItemTouchHelper - by overriding the onChilDraw method and drawing a rectangle on the provided canvas: ItemTouchHelper mIth = new ItemTouchHelper( …
Dark
  • 803
  • 2
  • 8
  • 23
15
votes
3 answers

SwiftUI navigation bar items going haywire when swipe back fails

I have a ListView, TasksView and then EditView. The flow goes like this: you have a list cell, you tap that which takes you to TasksView When a row is tapped in TasksView it takes you to EditView. When I half swipe back to navigate to previous view…
Osama Naeem
  • 1,830
  • 5
  • 16
  • 34