Skip to content Skip to sidebar Skip to footer

How Do I Set An OnTouchListener For A RelativeLayout?

I want to capture two events from a relativeLayout. When the user clicks it and when the user releases his click (like mousedown/mouseup) rl.setOnTouchListener(new View.OnTouch

Solution 1:

Try...

if (event.getAction() == MotionEvent.ACTION_DOWN) {
    ...
}

Post a Comment for "How Do I Set An OnTouchListener For A RelativeLayout?"