|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface Window.Callback
API from a Window back to its caller. This allows the client to intercept key dispatching, panels and menus, etc.
| Method Summary | |
|---|---|
boolean |
dispatchKeyEvent(KeyEvent event)
Called to process key events. |
boolean |
dispatchTouchEvent(MotionEvent event)
Called to process touch screen events. |
boolean |
dispatchTrackballEvent(MotionEvent event)
Called to process trackball events. |
void |
onContentChanged()
This hook is called whenever the content view of the screen changes (due to a call to Window.setContentView or
Window.addContentView). |
boolean |
onCreatePanelMenu(int featureId,
Menu menu)
Initialize the contents of the menu for panel 'featureId'. |
View |
onCreatePanelView(int featureId)
Instantiate the view to display in the panel for 'featureId'. |
boolean |
onMenuItemSelected(int featureId,
MenuItem item)
Called when a panel's menu item has been selected by the user. |
boolean |
onMenuOpened(int featureId,
Menu menu)
Called when a panel's menu is opened by the user. |
void |
onPanelClosed(int featureId,
Menu menu)
Called when a panel is being closed. |
boolean |
onPreparePanel(int featureId,
View view,
Menu menu)
Prepare a panel to be displayed. |
boolean |
onSearchRequested()
Called when the user signals the desire to start a search. |
void |
onWindowAttributesChanged(WindowManager.LayoutParams attrs)
This is called whenever the current window attributes change. |
void |
onWindowFocusChanged(boolean hasFocus)
This hook is called whenever the window focus changes. |
| Method Detail |
|---|
boolean dispatchKeyEvent(KeyEvent event)
Window.superDispatchKeyEvent(android.view.KeyEvent) to do the
standard key processing.
event - The key event.
boolean dispatchTouchEvent(MotionEvent event)
Window.superDispatchTouchEvent(android.view.MotionEvent) to do the
standard touch screen processing.
event - The touch screen event.
boolean dispatchTrackballEvent(MotionEvent event)
Window.superDispatchTrackballEvent(android.view.MotionEvent) to do the
standard trackball processing.
event - The trackball event.
View onCreatePanelView(int featureId)
featureId - Which panel is being created.
onPreparePanel(int, android.view.View, android.view.Menu)
boolean onCreatePanelMenu(int featureId,
Menu menu)
You can safely hold on to menu (and any items created from it), making modifications to it as desired, until the next time onCreatePanelMenu() is called for this feature.
featureId - The panel being created.menu - The menu inside the panel.
boolean onPreparePanel(int featureId,
View view,
Menu menu)
featureId - The panel that is being displayed.view - The View that was returned by onCreatePanelView().menu - If onCreatePanelView() returned null, this is the Menu
being displayed in the panel.
onCreatePanelView(int)
boolean onMenuOpened(int featureId,
Menu menu)
featureId - The panel that the menu is in.menu - The menu that is opened.
boolean onMenuItemSelected(int featureId,
MenuItem item)
featureId - The panel that the menu is in.item - The menu item that was selected.
void onWindowAttributesChanged(WindowManager.LayoutParams attrs)
void onContentChanged()
Window.setContentView or
Window.addContentView).
void onWindowFocusChanged(boolean hasFocus)
hasFocus - Whether the window now has focus.
void onPanelClosed(int featureId,
Menu menu)
featureId - The panel that is being displayed.menu - If onCreatePanelView() returned null, this is the Menu
being displayed in the panel.boolean onSearchRequested()
Activity.onSearchRequested()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||