次の方法で共有


KeyEvent.DispatcherState.StartTracking(KeyEvent, Object) Method

Definition

Start tracking the key code associated with the given event.

[Android.Runtime.Register("startTracking", "(Landroid/view/KeyEvent;Ljava/lang/Object;)V", "GetStartTracking_Landroid_view_KeyEvent_Ljava_lang_Object_Handler")]
public virtual void StartTracking (Android.Views.KeyEvent? e, Java.Lang.Object? target);
[<Android.Runtime.Register("startTracking", "(Landroid/view/KeyEvent;Ljava/lang/Object;)V", "GetStartTracking_Landroid_view_KeyEvent_Ljava_lang_Object_Handler")>]
abstract member StartTracking : Android.Views.KeyEvent * Java.Lang.Object -> unit
override this.StartTracking : Android.Views.KeyEvent * Java.Lang.Object -> unit

Parameters

target
Object
Attributes

Remarks

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 KeyEvent#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 Callback#onKeyDown.

Java documentation for android.view.KeyEvent.DispatcherState.startTracking(android.view.KeyEvent, java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to