Class SfMaskedEdit
Represents the Masked Edit control
Inheritance
Implements
Namespace: Syncfusion.Android.MaskedEdit
Assembly: Syncfusion.SfMaskedEdit.Android.dll
Syntax
public class SfMaskedEdit : EditText, View.IOnTouchListener, IJavaObject, IDisposable, IJavaPeerable
Constructors
SfMaskedEdit(Context)
Initializes a new instance of the SfMaskedEdit class
Declaration
public SfMaskedEdit(Context context)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | the application context |
SfMaskedEdit(Context, IAttributeSet)
Initializes a new instance of the SfMaskedEdit class
Declaration
public SfMaskedEdit(Context context, IAttributeSet attributeSet)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | the application context |
Android.Util.IAttributeSet | attributeSet | the attributes |
SfMaskedEdit(Context, IAttributeSet, Int32)
Initializes a new instance of the SfMaskedEdit class
Declaration
public SfMaskedEdit(Context context, IAttributeSet attributeSet, int defaultStyle)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | application context |
Android.Util.IAttributeSet | attributeSet | the attributes |
System.Int32 | defaultStyle | the default style |
SfMaskedEdit(Context, IAttributeSet, Int32, Int32)
Initializes a new instance of the SfMaskedEdit class
Declaration
public SfMaskedEdit(Context context, IAttributeSet attributeSet, int defaultStyle, int defaultStyleResource)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | application context |
Android.Util.IAttributeSet | attributeSet | the attributes |
System.Int32 | defaultStyle | the default style |
System.Int32 | defaultStyleResource | the default resource |
SfMaskedEdit(IntPtr, JniHandleOwnership)
Initializes a new instance of the SfMaskedEdit class
Declaration
protected SfMaskedEdit(IntPtr javaReference, JniHandleOwnership transfer)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | javaReference | java reference |
Android.Runtime.JniHandleOwnership | transfer | the runtime ownership |
Properties
BorderColor
Gets or sets the Border color
Declaration
public Color BorderColor { get; set; }
Property Value
Type |
---|
Android.Graphics.Color |
ClearButtonVisibility
Gets or sets the visibility for clear button.
Declaration
public ClearButtonVisibilityMode ClearButtonVisibility { get; set; }
Property Value
Type |
---|
ClearButtonVisibilityMode |
Culture
Gets or sets the culture
Declaration
public CultureInfo Culture { get; set; }
Property Value
Type |
---|
System.Globalization.CultureInfo |
CursorPosition
Gets or sets the position of the cursor in masked edit.
Declaration
public int CursorPosition { get; set; }
Property Value
Type |
---|
System.Int32 |
CutCopyMaskFormat
Gets or sets a value that determines whether literals and prompt characters are copied to the clipboard.
Declaration
public MaskFormat CutCopyMaskFormat { get; set; }
Property Value
Type | Description |
---|---|
MaskFormat | The default value is MaskFormat.IncludeLiterals. |
EnablePasswordDelay
Gets or sets a value indicating whether the password character should be displayed with delay or not.
Declaration
public bool EnablePasswordDelay { get; set; }
Property Value
Type |
---|
System.Boolean |
ErrorBorderColor
Gets or sets the error border color
Declaration
public Color ErrorBorderColor { get; set; }
Property Value
Type |
---|
Android.Graphics.Color |
HasError
Gets a value indicating whether the mask has error
Declaration
public bool HasError { get; }
Property Value
Type |
---|
System.Boolean |
HidePromptOnLeave
Gets or sets a value indicating whether the prompt characters in the input mask are hidden when the masked text box loses focus.
Declaration
public bool HidePromptOnLeave { get; set; }
Property Value
Type |
---|
System.Boolean |
HintTextSize
Gets or sets the watermark size
Declaration
public float HintTextSize { get; set; }
Property Value
Type |
---|
System.Single |
HintTypeface
Gets or sets watermark style
Declaration
public Typeface HintTypeface { get; set; }
Property Value
Type |
---|
Android.Graphics.Typeface |
InputType
Gets or sets the value indicating the input type for the edit text.
Declaration
public override InputTypes InputType { get; set; }
Property Value
Type |
---|
Android.Text.InputTypes |
Mask
Gets or sets the Mask
Declaration
public string Mask { get; set; }
Property Value
Type |
---|
System.String |
MaskType
Gets or sets the mask type
Declaration
public MaskType MaskType { get; set; }
Property Value
Type |
---|
MaskType |
PasswordChar
Gets or sets a value to be displayed in substitute of user input.
Declaration
public char PasswordChar { get; set; }
Property Value
Type |
---|
System.Char |
PasswordDelayDuration
Gets or sets the duration of the delay when tying the password character.
Declaration
public double PasswordDelayDuration { get; set; }
Property Value
Type |
---|
System.Double |
PromptChar
Gets or sets the Prompt Character
Declaration
public char PromptChar { get; set; }
Property Value
Type |
---|
System.Char |
SkipLiterals
Gets or sets a value indicating whether the user is allowed to reenter literal values.
Declaration
public bool SkipLiterals { get; set; }
Property Value
Type |
---|
System.Boolean |
Typeface
Gets or set the typeface of the text
Declaration
public override Typeface Typeface { get; set; }
Property Value
Type |
---|
Android.Graphics.Typeface |
ValidationMode
Gets or sets the ValidationMode.
Declaration
public InputValidationMode ValidationMode { get; set; }
Property Value
Type |
---|
InputValidationMode |
Value
Gets or sets the Value.
Declaration
public object Value { get; set; }
Property Value
Type |
---|
System.Object |
ValueMaskFormat
Gets or sets the mask format for value
Declaration
public MaskFormat ValueMaskFormat { get; set; }
Property Value
Type |
---|
MaskFormat |
Methods
add_MaskInputRejected(MaskInputRejectedEventHandler)
Declaration
public void add_MaskInputRejected(MaskInputRejectedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
MaskInputRejectedEventHandler | value |
add_ValueChanged(ValueChangedEventHandler)
Declaration
public void add_ValueChanged(ValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventHandler | value |
Dispose(Boolean)
Method to release the resources used
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | indicates whether the control is dispose or not |
OnAttachedToWindow()
This is called when the view is attached to a window.
Declaration
protected override void OnAttachedToWindow()
OnDetachedFromWindow()
Method to release the resources used
Declaration
protected override void OnDetachedFromWindow()
OnEditorAction(ImeAction)
Method gets called when the editor action performed.
Declaration
public override void OnEditorAction(ImeAction actionCode)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.InputMethods.ImeAction | actionCode | action code |
OnFocusChanged(Boolean, FocusSearchDirection, Rect)
Handles when focus changed
Declaration
protected override void OnFocusChanged(bool gainFocus, FocusSearchDirection direction, Rect previouslyFocusedRect)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | gainFocus | indicates whether the control gain focus |
Android.Views.FocusSearchDirection | direction | the direction |
Android.Graphics.Rect | previouslyFocusedRect | previous focused position |
OnSelectionChanged(Int32, Int32)
Handles the selection changed event
Declaration
protected override void OnSelectionChanged(int selStart, int selEnd)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | selStart | selection start index |
System.Int32 | selEnd | selection end index |
OnTextContextMenuItem(Int32)
Called when a context menu option for the text view is selected.
Declaration
public override bool OnTextContextMenuItem(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | To be added. |
Returns
Type | Description |
---|---|
System.Boolean | indicates whether added or not. |
OnTouch(View, MotionEvent)
It will be enable when touch the control
Declaration
public bool OnTouch(View view, MotionEvent e)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.View | view | It contain view |
Android.Views.MotionEvent | e | Contain event |
Returns
Type | Description |
---|---|
System.Boolean | It will return a boolean value |
remove_MaskInputRejected(MaskInputRejectedEventHandler)
Declaration
public void remove_MaskInputRejected(MaskInputRejectedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
MaskInputRejectedEventHandler | value |
remove_ValueChanged(ValueChangedEventHandler)
Declaration
public void remove_ValueChanged(ValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventHandler | value |
SetTextSize(ComplexUnitType, Single)
Set the default text size to a given unit and value.
Declaration
public override void SetTextSize(ComplexUnitType unit, float size)
Parameters
Type | Name | Description |
---|---|---|
Android.Util.ComplexUnitType | unit | The desired dimension unit. |
System.Single | size | The desired size in the given units. |
SetTypeface(Typeface, TypefaceStyle)
Sets the typeface and style in which the text should be displayed
Declaration
public override void SetTypeface(Typeface tf, TypefaceStyle style)
Parameters
Type | Name | Description |
---|---|---|
Android.Graphics.Typeface | tf | The typeface of the text |
Android.Graphics.TypefaceStyle | style | The style of the text |
Events
CursorPositionChanging
Raised the event during the change of cursor position.
Declaration
public event EventHandler<CursorPositionChangingEventArgs> CursorPositionChanging
Event Type
Type |
---|
System.EventHandler<CursorPositionChangingEventArgs> |
MaskInputRejected
Event handles when mask rejected.
Declaration
public event MaskInputRejectedEventHandler MaskInputRejected
Event Type
Type |
---|
MaskInputRejectedEventHandler |
ValueChanged
Event handles when value changed.
Declaration
public event ValueChangedEventHandler ValueChanged
Event Type
Type |
---|
ValueChangedEventHandler |