android.view.Window.Callback |
Known Indirect Subclasses |
API from a Window back to its caller. This allows the client to intercept key dispatching, panels and menus, etc.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Called to process generic motion events.
|
||||||||||
|
Called to process key events.
|
||||||||||
|
Called to process a key shortcut event.
|
||||||||||
|
Called to process population of
AccessibilityEvent
s.
|
||||||||||
|
Called to process touch screen events.
|
||||||||||
|
Called to process trackball events.
|
||||||||||
|
Called when an action mode has been finished.
|
||||||||||
|
Called when an action mode has been started.
|
||||||||||
|
Called when the window has been attached to the window manager.
|
||||||||||
|
This hook is called whenever the content view of the screen changes
(due to a call to
Window.setContentView
or
Window.addContentView
).
|
||||||||||
|
Initialize the contents of the menu for panel 'featureId'.
|
||||||||||
|
Instantiate the view to display in the panel for 'featureId'.
|
||||||||||
|
Called when the window has been attached to the window manager.
|
||||||||||
|
Called when a panel's menu item has been selected by the user.
|
||||||||||
|
Called when a panel's menu is opened by the user.
|
||||||||||
|
Called when a panel is being closed.
|
||||||||||
|
Prepare a panel to be displayed.
|
||||||||||
|
Called when the user signals the desire to start a search.
|
||||||||||
|
This is called whenever the current window attributes change.
|
||||||||||
|
This hook is called whenever the window focus changes.
|
||||||||||
|
Called when an action mode is being started for this window.
|
Called to process generic motion events. At the very least your
implementation must call
superDispatchGenericMotionEvent(MotionEvent)
to do the
standard processing.
event | The generic motion event. |
---|
Called to process key events. At the very least your
implementation must call
superDispatchKeyEvent(KeyEvent)
to do the
standard key processing.
event | The key event. |
---|
Called to process a key shortcut event.
At the very least your implementation must call
superDispatchKeyShortcutEvent(KeyEvent)
to do the
standard key shortcut processing.
event | The key shortcut event. |
---|
Called to process population of
AccessibilityEvent
s.
event | The event. |
---|
Called to process touch screen events. At the very least your
implementation must call
superDispatchTouchEvent(MotionEvent)
to do the
standard touch screen processing.
event | The touch screen event. |
---|
Called to process trackball events. At the very least your
implementation must call
superDispatchTrackballEvent(MotionEvent)
to do the
standard trackball processing.
event | The trackball event. |
---|
Called when an action mode has been finished. The appropriate mode callback method will have already been invoked.
mode | The mode that was just finished. |
---|
Called when an action mode has been started. The appropriate mode callback method will have already been invoked.
mode | The new mode that has just been started. |
---|
Called when the window has been attached to the window manager.
See
View.onAttachedToWindow()
for more information.
This hook is called whenever the content view of the screen changes
(due to a call to
Window.setContentView
or
Window.addContentView
).
Initialize the contents of the menu for panel 'featureId'. This is called if onCreatePanelView() returns null, giving you a standard menu in which you can place your items. It is only called once for the panel, the first time it is shown.
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. |
Instantiate the view to display in the panel for 'featureId'. You can return null, in which case the default content (typically a menu) will be created for you.
featureId | Which panel is being created. |
---|
Called when the window has been attached to the window manager.
See
View.onDetachedFromWindow()
for more information.
Called when a panel's menu item has been selected by the user.
featureId | The panel that the menu is in. |
---|---|
item | The menu item that was selected. |
Called when a panel's menu is opened by the user. This may also be called when the menu is changing from one type to another (for example, from the icon menu to the expanded menu).
featureId | The panel that the menu is in. |
---|---|
menu | The menu that is opened. |
Called when a panel is being closed. If another logical subsequent panel is being opened (and this panel is being closed to make room for the subsequent panel), this method will NOT be called.
featureId | The panel that is being displayed. |
---|---|
menu | If onCreatePanelView() returned null, this is the Menu being displayed in the panel. |
Prepare a panel to be displayed. This is called right before the panel window is shown, every time it is shown.
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. |
Called when the user signals the desire to start a search.
This is called whenever the current window attributes change.
This hook is called whenever the window focus changes. See
View.onWindowFocusChanged(boolean)
for more information.
hasFocus | Whether the window now has focus. |
---|
Called when an action mode is being started for this window. Gives the callback an opportunity to handle the action mode in its own unique and beautiful way. If this method returns null the system can choose a way to present the mode or choose not to start the mode at all.
callback | Callback to control the lifecycle of this action mode |
---|