Android Guides | Samples

Android.Views.KeyEvent.DispatcherState Class

Use with KeyEvent.Dispatch(ICallback,KeyEvent+DispatcherState,KeyEvent+DispatcherState) for more advanced key dispatching, such as long presses.

See Also: KeyEvent+DispatcherState

Syntax

[Android.Runtime.Register("android/view/KeyEvent$DispatcherState", DoNotGenerateAcw=true)]
public class KeyEvent.DispatcherState : Object

Remarks

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 5

The members of Android.Views.KeyEvent.DispatcherState are listed below.

See Also: Object

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

HandleUpEvent(KeyEvent)
Handle key up event to stop tracking.
IsTracking(KeyEvent) : Boolean
Return true if the key event is for a key code that is currently being tracked by the dispatcher.
PerformedLongPress(KeyEvent)
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.
Reset()
Reset back to initial state.
Reset(Object)
Stop any tracking associated with this target.
StartTracking(KeyEvent, Object)
Start tracking the key code associated with the given event.