public interface

SosMaskedField

com.salesforce.android.sos.maskview.SosMaskedField
Known Indirect Subclasses

Class Overview

Interface that must be implemented for a View to be masked.

Summary

Public Methods
abstract boolean isMasked()
Returns the current masking state of the View.
abstract boolean isUsingFocusMasking()
Returns whether the focused state of the View is being used to automatically determine the masking state.
abstract void setMask(Drawable drawable)
Sets the Drawable that will be used to draw the field mask to the input value.
abstract void showMask(boolean show)
Forces the View to be unmasked (shown).
abstract void useFocusMasking(boolean useFocusMasking)
Set whether the focused state of the View should be used to automatically determine when the View should be masked.

Public Methods

public abstract boolean isMasked ()

Returns the current masking state of the View.

Returns
  • whether the View is currently masked.

public abstract boolean isUsingFocusMasking ()

Returns whether the focused state of the View is being used to automatically determine the masking state.

Returns
  • whether focus is being used to determine when the View is masked.

public abstract void setMask (Drawable drawable)

Sets the Drawable that will be used to draw the field mask to the input value. If the input is null, the default Drawable will be used.

Parameters
drawable the Drawable used to draw the field mask or null to use the default.

public abstract void showMask (boolean show)

Forces the View to be unmasked (shown).

When TRUE is passed in, the View is drawn without a mask. When FALSE is passed in, the View is NOT forced to be unmasked.

It is still possible that the encapsulating View will be drawn without a mask even if FALSE is passed in. This can happen if focus masking is being used useFocusMasking(boolean) and the View has focus. Passing FALSE only ensures that the View is not forced into being unmasked.

Parameters
show flag indicating that the View should be forced unmasked.

public abstract void useFocusMasking (boolean useFocusMasking)

Set whether the focused state of the View should be used to automatically determine when the View should be masked. The default behaviour is to have a view visible when it has focus and be masked when it does not.

Parameters
useFocusMasking whether to use focus to automatically mask the View.