Share via


View.OnTrackballEvent(MotionEvent) Method

Definition

Implement this method to handle trackball motion events.

[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 motion event.

Returns

True if the event was handled, false otherwise.

Attributes

Remarks

Implement this method to handle trackball motion events.

The <em>relative</em> movement of the trackball since the last event can be retrieve with MotionEvent#getX MotionEvent.getX() and MotionEvent#getY MotionEvent.getY(). These are normalized so that a movement of 1 corresponds to the user pressing one DPAD key (so they will often be fractional values, representing the more fine-grained movement information available from a trackball).

Java documentation for android.view.View.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