CheckSingle

public abstract class CheckSingle implements CheckInterface

This is the base class most of the validation Checks that relate to a single view.

CheckCompound if you like to validate multiple checks as one unit.

Methods

clearError

public void clearError()

getValue

protected String getValue()

Gets the value to be validated.

Returns:value of the view

getView

protected TextView getView()

Gets the view we are working on.This can be anything that is a child of TextView e.g. EditText, CompoundButton like Checkboxes

Incase of a spinner you return the selected view like so.

(TextView) spinner.getSelectedView();

Returns:the View from which to get value to isValid and also on which to set error by invoking view.setError()

setError

public void setError(String error)