java.lang.Object | |
↳ | android.view.KeyEvent.DispatcherState |
Use with
dispatch(Callback, DispatcherState, Object)
for more advanced key dispatching, such as long presses.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Handle key up event to stop tracking.
|
||||||||||
|
Return true if the key event is for a key code that is currently
being tracked by the dispatcher.
|
||||||||||
|
Keep track of the given event's key code as having performed an
action with a long press, so no action should occur on the up.
|
||||||||||
|
Stop any tracking associated with this target.
|
||||||||||
|
Reset back to initial state.
|
||||||||||
|
Start tracking the key code associated with the given event.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Handle key up event to stop tracking. This resets the dispatcher state, and updates the key event state based on it.
This is only needed if you are directly dispatching events, rather
than handling them in
onKeyUp(int, KeyEvent)
.
Return true if the key event is for a key code that is currently being tracked by the dispatcher.
Keep track of the given event's key code as having performed an action with a long press, so no action should occur on the up.
This is only needed if you are directly dispatching events, rather
than handling them in
onKeyLongPress(int, KeyEvent)
.
Stop any tracking associated with this target.
Start tracking the key code associated with the given event. This
can only be called on a key down. It will allow you to see any
long press associated with the key, and will result in
isTracking()
return true on the long press and up
events.
This is only needed if you are directly dispatching events, rather
than handling them in
onKeyDown(int, KeyEvent)
.