Questions tagged [android-swipe]

23 questions
7
votes
1 answer

MotionLayout - OnSwipe not working on clickable children

I am running into an issue using MotionLayout where a user cannot swipe up/down if they start their swipe on a clickable item. I want the user to be able to swipe over any part of the screen, and the swiping transition is triggered. Basically, the…
7
votes
2 answers

Error parameter specified as non-null is null when use swipe touch listener in recyclerView - Android

I am using from bellow class for detect swipe in recyclerView: open class OnSwipeTouchListener(context: Context) : View.OnTouchListener { var context: Context? = context private val gestureDetector = GestureDetector(context,…
jo jo
  • 1,758
  • 3
  • 20
  • 34
6
votes
3 answers

How to implement right swipe in ListFragment with Custom Item Adapter?

What I need is to detect the right swipe of the item and display some activity. I did prev. investigation but it not seems to obvious to catch correct solution. Please, help me. My code is following. public class FragmentTwo extends ListFragment …
NoWar
  • 36,338
  • 80
  • 323
  • 498
4
votes
1 answer

Android, Kotlin : how can I only allow my view pager swiping on the left when needed

well hello dear viewers. My situation : I have a viewpager that lets my user swiping on left and right. I have a screen (a fragment), that I want to be completed by the user before he can swipe. EDIT 4 : SOLUTION As the ViewPager2 works like a…
3
votes
1 answer

How to make swipe with recycler view item?

I am working on floating Keyboard using Recycler view which would appear on screen when a button is clicked and dismisses when Right / Left swipe is done. As I am doing so I observed the swiping the keyboard is not smoother (Some times swipe…
2
votes
1 answer

RecyclerView with different ItemTouchHelper for each item on the list

I'm trying to implement a Recycleview with different ItemTouchHelper for each item on the list. The only way that I know is to add an ItemTouchHelper directly to the RecycleView and not to the item. Example of what I'm trying to do: I have a list…
groff07
  • 2,363
  • 3
  • 32
  • 48
2
votes
2 answers

Make On click listener to on Swipe

I am a beginner in the android studio. I have created a button which opens a new activity which shows the full details of a specific recycler view item. How I can make this on left swipe. I need on left swipe a new activity should be open and the…
Nasim
  • 125
  • 2
  • 12
1
vote
1 answer

Android MotionLayout "dragDown" stops midview, if I swipe

I have the following MotionLayout scene:
1
vote
1 answer

Android - Disable swipe to previous screen

How to intercept the swipe to left movement to navigate to previous screen and disable the navigation ? I have tried to intercept the action and return false but it does not work: @SuppressLint("ClickableViewAccessibility") override fun…
eqtèöck
  • 971
  • 1
  • 13
  • 27
1
vote
0 answers

Android Is it possible to swipe part of an element in a recycler view?

I have a recycler view and each element has a cardView and a text on the side like this: My goal is to be able swipe ONLY the cardView (yellow in the picture) in order to delete de element. I'm well aware that it's possible to swipe the entire…
1
vote
0 answers

RecyclerView separate the swipe left event from sub value Android

I am developing an Android app. I am using RecyclerView to display a list. Here is my list item one card: I have implemented the left swipe on the card and showing two more options as shown below image. Now the challenge I am facing is I want to…
Harsh Shah
  • 2,162
  • 2
  • 19
  • 39
1
vote
2 answers

android SwipeRefreshLayout doesn't allow WebView scrolling

Am trying to implement android SwipeRefreshLayout in my WebView app. When I swipe down it refreshes the page but it doesn't allow to scroll up and down anymore except the swipe. I have tried some basic fix I found online but it still not…
Peter
  • 1,860
  • 2
  • 18
  • 47
1
vote
1 answer

Swipe to delete or edit an item from recyclerView

I'm creating a simple swipe to delete or edit an item in recyclerView but I have an error : java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. //I've found this code on…
Monir
  • 53
  • 2
  • 9
1
vote
1 answer

GestureListener.onFling kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter e1 - Android

I am manage onSwipeRight and onSwipeLeft on recyclerView like bellow: override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) val swipeController = SwipeController(this) …
jo jo
  • 1,758
  • 3
  • 20
  • 34
1
vote
0 answers

How to add horizontal swipe with Vertical Swipe?

I have made an app in which I have added functionality of vertical swipe using ViewPager class. Now I need help to also add Horizontal swipe. I have seen several projects on GitHub for vertical & horizontal swipe together in same activity but could…
1
2