OnClick (View v) An ordinary click button event
The boolean onkeymultiple (int keycode,int repeatcount,keyevent event) is used to occur when multiple events are continuous, for key repetition, and @override implementations must be overloaded
Boolean onKeyDown (int keycode,keyevent event) to occur when the key is pressed
Boolean onKeyUp (int keycode,keyevent event) to occur when a key is released
Ontouchevent (motionevent Event) touch-screen events that occur when there is an action on the touchscreen
Boolean onkeylongpress (int keycode, keyevent event) When you're on time
Boolean ontrackballevent (Motionevent event):
Parameter event: The parameter event is the object of the mobile Trackball event encapsulation class, which encapsulates the details of the triggering event, including the type of event, the trigger time, and so on, in general, the object is created when the user manipulates the trackball.
Return value: The return value of the method is exactly the same as the return value mechanism for each callback method described earlier, because the book is limited in length and is not covered.
The difference between the trackball and the phone keypad is shown below.
Some models of mobile phone design of the trackball will be more beautiful than the only phone keyboard, can add users to the overall impression of the phone.
Trackball is easier to use, such as using Trackball control in some games.
The use of trackball is more granular than the keyboard, that is, when scrolling the trackball, the value of the representation state of the background will change more subtle, more accurate.
The method is basically the same as the various callback methods described earlier, can be overridden in the activity, or overridden in the implementation class of each view.
Tip: In the emulator running state, you can open the simulator's trackball through the F6 key, and then you can simulate the Trackball event by moving the mouse.
Various events in the development of Android