Stats

25 Contributors: 2 Tuesday, August 8, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap
Download eBook

Handling touch and motion events

Download android eBook

Introduction

A summary of some of the basic touch/motion-handling systems in the Android API.

Parameters

ListenerDetails
onTouchListenerHandles single touches for buttons, surfaces and more
onTouchEventA listener that can be found in surfaces(e.g. SurfaceView). Does not need to be set like other listeners(e,g. onTouchListener)
onLongTouchSimilar to onTouch, but listens for long presses in buttons, surfaces and more.

Related Examples