(Source code introduction:
Users can interact with your UI at two levels, the activity level and the view level. At the activity level, the activity class exposes some methods that you can override. You can override some common methods in the activity:
The following example rewrites some methods in an activity to show how users interact with various activities.
onKeyDown
onKeyUp
onMenuItemSelected
onMenuOpened)