November 2011
Beginner
196 pages
5h 3m
English
Android works on a variety of devices, so it has methods to gather all types of input. For you, however, the most important events are interactions with the touchscreen. Your number-one method is the following:
Public boolean onTouchEvent(MotionEvent event){
}
This method is inherited from the View class, and you override it in order to perform your own operations. The key aspect of this function is the parameter it contains. A MotionEvent is an object in Android that describes a variety of interactions with the tablet. You can find out a lot about the event by calling methods in the MotionEvent class. This class has many options, but the important functions are pointed out as you use them. If you’re curious, you can look ...
Read now
Unlock full access