Class NumericButton
A customized view that reacts to touch events.
Inheritance
Namespace: Syncfusion.SfDataGrid.DataPager
Assembly: Syncfusion.SfDataGrid.Android.dll
Syntax
public class NumericButton : PanelElement
Constructors
NumericButton(Context)
Initializes a new instance of the NumericButton class.
Declaration
public NumericButton(Context context)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | The Android.Content.Context. |
Properties
EllipsisPosition
Gets or sets the EllipsisPosition of the numeric button, the ellipsis position may be in the left or right or both ends of the SfDataPager based on the AutoEllipsisMode.
Declaration
public EllipsisPosition EllipsisPosition { get; set; }
Property Value
Type | Description |
---|---|
EllipsisPosition | The EllipsisPosition of the numeric button. |
IsButtonEnabled
Gets or sets a value indicating whether to enable/disable the NumericButton.
Declaration
public bool IsButtonEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True, if the button is enabled, otherwise false. The default value is true. |
IsCurrentPage
Gets or sets a value indicating whether the page is current page or not.
Declaration
public bool IsCurrentPage { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The boolean value denoting whether the page is current page or not. |
IsEllipsisElement
Gets or sets a value indicating whether the numeric button is a ellipsis element or not. By default, all the numeric buttons in the page will be in view. However, the user can set auto ellipsis mode by using AutoEllipsisMode property, by which the numeric button will be displayed as the ellipsis element.
Declaration
public bool IsEllipsisElement { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The boolean value indicating whether the numeric button is a ellipsis element or not. |
NavigationButtons
Gets or sets the navigation buttons, which are used to navigate through pages.
Declaration
public NavigationButtons NavigationButtons { get; set; }
Property Value
Type | Description |
---|---|
NavigationButtons | The navigation buttons, which are used to navigate through pages. |
PageIndex
Gets or sets the current page index of the SfDataPager.
Declaration
public int PageIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The current page index of the SfDataPager. |
Methods
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |
OnDraw(Canvas)
The borders for the numeric button view is drawn here.
Declaration
protected override void OnDraw(Canvas canvas)
Parameters
Type | Name | Description |
---|---|---|
Android.Graphics.Canvas | canvas | The Android.Graphics.Canvas on which the background will be drawn. |
OnLayout(Boolean, Int32, Int32, Int32, Int32)
Positions and sizes the content of a NumericButton.
Declaration
protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | changed | True if the size of the view is changed, otherwise false. |
System.Int32 | left | A value that represents the x coordinate of the child. |
System.Int32 | top | A value that represents the y coordinate of the child. |
System.Int32 | right | A value that represents the width of the child. |
System.Int32 | bottom | A value that represents the height of the child. |
Overrides
OnTouchEvent(MotionEvent)
This method handles the touch event.
Declaration
public override bool OnTouchEvent(MotionEvent e)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.MotionEvent | e | The Android.Views.MotionEvent. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a boolean value indicating whether touch is handled or not. |
SetAsCurrentPage()
Sets current page based on selection, whether selected element is ellipsis or numeric button.
Declaration
public void SetAsCurrentPage()