Class ContentView
A custom view group used to recognize the touch actions when gesture actions are performed to process the SfTreeView's selection.
Implements
Namespace: Syncfusion.Android.TreeView
Assembly: Syncfusion.SfTreeView.Android.dll
Syntax
public class ContentView : ViewGroup, GestureDetector.IOnGestureListener, IJavaObject, IDisposable, IJavaPeerable
Constructors
ContentView(Context)
Initializes a new instance of the ContentView class.
Declaration
public ContentView(Context context)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | Represent the Android.Content.Context of ContentView. |
Methods
Dispose(Boolean)
Dispose the instances, if parameter is true.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Represents the boolean value for disposing objects. |
OnDown(MotionEvent)
Notified when a tap occurs with the down Android.Views.MotionEvent that triggered it.
Declaration
public bool OnDown(MotionEvent e)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.MotionEvent | e | Contains the arguments for Android.Views.MotionEvent. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if down action is performed. |
OnFling(MotionEvent, MotionEvent, Single, Single)
Notified of a fling event when it occurs with the initial on down Android.Views.MotionEvent and the matching up Android.Views.MotionEvent.
Declaration
public bool OnFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.MotionEvent | e1 | Contains the arguments for Android.Views.MotionEvent value 1. |
Android.Views.MotionEvent | e2 | Contains the arguments for Android.Views.MotionEvent value 2. |
System.Single | velocityX | Represent the x position on fling. |
System.Single | velocityY | Represent the y position on fling. |
Returns
Type | Description |
---|---|
System.Boolean | Returns always true. |
OnLayout(Boolean, Int32, Int32, Int32, Int32)
Positions and sizes the children of the ContentView.
Declaration
protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | changed | Indicates whether the layout has changed or not. |
System.Int32 | left | The current extreme left position of the ContentView. |
System.Int32 | top | The current top position of the ContentView. |
System.Int32 | right | The current right extreme position of the ContentView. |
System.Int32 | bottom | The current bottom position of the ContentView. |
OnLongPress(MotionEvent)
Notified when a long press occurs with the initial on down Android.Views.MotionEvent that trigged it.
Declaration
public void OnLongPress(MotionEvent e)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.MotionEvent | e | Contains the arguments for Android.Views.MotionEvent. |
OnMeasure(Int32, Int32)
This method is used to get the desired size of an element.
Declaration
protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | widthMeasureSpec | The available width for the element to use. |
System.Int32 | heightMeasureSpec | The available height for the element to use. |
OnScroll(MotionEvent, MotionEvent, Single, Single)
Notified when a scroll occurs with the initial on down Android.Views.MotionEvent and the current move Android.Views.MotionEvent.
Declaration
public bool OnScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.MotionEvent | e1 | Contains the arguments for Android.Views.MotionEvent value 1. |
Android.Views.MotionEvent | e2 | Contains the arguments for Android.Views.MotionEvent value 2. |
System.Single | distanceX | Represent the distance scrolled in x position. |
System.Single | distanceY | Represent the distance scrolled in y position. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true when scrolling is about to occur. |
OnShowPress(MotionEvent)
Indicates that touch down action is performed and a move or up action yet not performed.
Declaration
public void OnShowPress(MotionEvent e)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.MotionEvent | e | Contains the arguments for Android.Views.MotionEvent. |
OnSingleTapUp(MotionEvent)
Notified when a tap occurs with the up Android.Views.MotionEvent that triggered it.
Declaration
public bool OnSingleTapUp(MotionEvent e)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.MotionEvent | e | Contains the arguments for Android.Views.MotionEvent. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if tapped with up action is performed. |
OnTouchEvent(MotionEvent)
Raises when a touch event is dispatched to a view.
Declaration
public override bool OnTouchEvent(MotionEvent e)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.MotionEvent | e | The Android.Views.MotionEvent object containing full information about the event. |
Returns
Type | Description |
---|---|
System.Boolean | True if the listener has consumed the event, false otherwise. |