To Examples
TouchEvent1 Example
Goal
- Set up an onTouch event handler that records the locations of touch events in a view.
Directions
- Create a project named TouchEvent1. Leave the layout and activity
files with their default names.
- Set up the app with these source code files:
activity_main.xml
MainActivity.java
- Run your app to test it. Read the recorded touch events in the Logcat
window.