Top "Ontouchlistener" questions

Android interface to define a callback to be invoked when a view is touched.

Single method to implement onTouchListener() for multiple buttons

I am trying to see if there is a way to create a single method to implement a touch listener …

android button ontouchlistener
ViewPager intercepts all x-axis onTouch events. How to disable?

Scope There is a viewpager of two fragments. One of those fragments has a layout witch listens to onTouch changes …

android ontouchlistener android-viewpager
singletap touch detect in Ontouch method of the view

I needed a singletap touch detect in my custom view's ontouch method. I tried getting the x and y values …

android touch ontouchlistener
How to combine OnClickListener and OnTouchListener for an ImageButton

I need to do something when the user clicks the ImageButton I've tried to create a static class that implements …

android onclicklistener ontouchlistener
Swipe and OnClick events in RecyclerView

I'm trying to implement a swipe to dismiss action in a RecyclerView but when I set an OnClickListener on any …

android swipe ontouchlistener android-recyclerview
Detect touch event on a view when dragged over from other view

How do I detect the touch event if the user touches on view A and drags to bottom over the …

android android-view ontouchlistener
requestDisallowInterceptTouchEvent does not work unless selecting view first

According to android docs you can get your parent ViewGroup and call requestDisallowInterceptTouchEvent(true) on it to stop other things …

java android ontouchlistener
OnTouch works, but OnClickListener doesn't?

I created a widget/control that I can reuse which I created by extending RelativeLayout. Then, in one of my …

android android-view onclicklistener ontouchlistener
How to add swipe functionality on Android CardView?

I have a single CardView that contains two TextViews and two ImageViews. I want to be able to swipe left …

android android-layout ontouchlistener android-cardview
A View's onTouchListener vs onTouchEvent

What is the difference between a view's onTouchEvent : public class MyCustomView extends View { // THIS : @Override public boolean onTouchEvent(MotionEvent event) { …

android touch-event ontouchlistener