Android Guides | Samples

Android.Views.TouchDelegate Class

Helper class to handle situations where you want a view to have a larger touch area than its actual view bounds.

See Also: TouchDelegate

Syntax

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

Remarks

Helper class to handle situations where you want a view to have a larger touch area than its actual view bounds. The view whose touch area is changed is called the delegate view. This class should be used by an ancestor of the delegate. To use a TouchDelegate, first create an instance that specifies the bounds that should be mapped to the delegate and the delegate view itself.

The ancestor should then forward all of its touch events received in its View.OnTouchEvent(MotionEvent) to TouchDelegate.OnTouchEvent(MotionEvent).

[Android Documentation]

Requirements

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

The members of Android.Views.TouchDelegate are listed below.

See Also: Object

Public Constructors

Constructor

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

OnTouchEvent(MotionEvent) : Boolean
Will forward touch events to the delegate view if the event is within the bounds specified in the constructor.