Partager via


Activity.OnTrackballEvent(MotionEvent) Method

Definition

Called when the trackball was moved and not handled by any of the views inside of the activity.

[Android.Runtime.Register("onTrackballEvent", "(Landroid/view/MotionEvent;)Z", "GetOnTrackballEvent_Landroid_view_MotionEvent_Handler")]
public virtual bool OnTrackballEvent (Android.Views.MotionEvent? e);
[<Android.Runtime.Register("onTrackballEvent", "(Landroid/view/MotionEvent;)Z", "GetOnTrackballEvent_Landroid_view_MotionEvent_Handler")>]
abstract member OnTrackballEvent : Android.Views.MotionEvent -> bool
override this.OnTrackballEvent : Android.Views.MotionEvent -> bool

Parameters

e
MotionEvent

The trackball event being processed.

Returns

Return true if you have consumed the event, false if you haven't. The default implementation always returns false.

Attributes

Remarks

Called when the trackball was moved and not handled by any of the views inside of the activity. So, for example, if the trackball moves while focus is on a button, you will receive a call here because buttons do not normally do anything with trackball events. The call here happens <em>before</em> trackball movements are converted to DPAD key events, which then get sent back to the view hierarchy, and will be processed at the point for things like focus navigation.

Java documentation for android.app.Activity.onTrackballEvent(android.view.MotionEvent).

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