use of com.mobsandgeeks.saripaar.Validator in project android-saripaar by ragunathjawahar.
the class UnorderedValidateActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_un_ordered_validate);
// UI References
mNameEditText = (EditText) findViewById(R.id.nameEditText);
mAddressEditText = (EditText) findViewById(R.id.addressEditText);
mEmailEditText = (EditText) findViewById(R.id.emailEditText);
mPhoneEditText = (EditText) findViewById(R.id.phoneEditText);
mResultTextView = (TextView) findViewById(R.id.resultTextView);
RadioGroup modeRadioGroup = (RadioGroup) findViewById(R.id.modeRadioGroup);
Button saripaarButton = (Button) findViewById(R.id.saripaarButton);
// Validator
mValidator = new Validator(this);
mValidator.setValidationListener(this);
// Event listeners
modeRadioGroup.setOnCheckedChangeListener(this);
saripaarButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
mValidator.validate();
} catch (IllegalStateException e) {
mResultTextView.setText("CRASH");
}
}
});
}
use of com.mobsandgeeks.saripaar.Validator in project android-saripaar by ragunathjawahar.
the class UnorderedValidateTillActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_un_ordered_validate_till_before);
// UI References
mNameEditText = (EditText) findViewById(R.id.nameEditText);
mAddressEditText = (EditText) findViewById(R.id.addressEditText);
mEmailEditText = (EditText) findViewById(R.id.emailEditText);
mPhoneEditText = (EditText) findViewById(R.id.phoneEditText);
mResultTextView = (TextView) findViewById(R.id.resultTextView);
RadioGroup modeRadioGroup = (RadioGroup) findViewById(R.id.modeRadioGroup);
// Validator
mValidator = new Validator(this);
mValidator.setValidationListener(this);
// Event listeners
mNameEditText.setOnFocusChangeListener(this);
mAddressEditText.setOnFocusChangeListener(this);
mEmailEditText.setOnFocusChangeListener(this);
mPhoneEditText.setOnFocusChangeListener(this);
modeRadioGroup.setOnCheckedChangeListener(this);
}
use of com.mobsandgeeks.saripaar.Validator in project android-saripaar by ragunathjawahar.
the class ValidateInvisibleViewsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_validate_invisible_views);
// View references
mNameEditText = (EditText) findViewById(R.id.nameEditText);
mEmailEditText = (EditText) findViewById(R.id.emailEditText);
mResultTextView = (TextView) findViewById(R.id.resultTextView);
RadioButton showViewRadioButton = (RadioButton) findViewById(R.id.showRadioButton);
RadioButton hideViewRadioButton = (RadioButton) findViewById(R.id.hideRadioButton);
CheckBox validateHiddenViewsCheckBox = (CheckBox) findViewById(R.id.validateHiddenViewsCheckBox);
Button saripaarButton = (Button) findViewById(R.id.saripaarButton);
// Validator
mValidator = new Validator(this);
mValidator.setValidationListener(this);
// Event listeners
showViewRadioButton.setOnCheckedChangeListener(this);
hideViewRadioButton.setOnCheckedChangeListener(this);
validateHiddenViewsCheckBox.setOnCheckedChangeListener(this);
saripaarButton.setOnClickListener(this);
}
use of com.mobsandgeeks.saripaar.Validator in project android-saripaar by ragunathjawahar.
the class CustomViewDataAdapterActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_custom_view_data_adapter);
// UI References
mBooleanFloatLabeledEditText = (FloatLabeledEditText) findViewById(R.id.booleanFloatLabelEditText);
mRegisterAdapterRadioButton = (RadioButton) findViewById(R.id.registerAdapterRadioButton);
mResultTextView = (TextView) findViewById(R.id.resultTextView);
mSaripaarButton = (Button) findViewById(R.id.saripaarButton);
// Validator
mValidator = new Validator(this);
mValidator.setValidationListener(this);
// Event listeners
mSaripaarButton.setOnClickListener(this);
mRegisterAdapterRadioButton.setOnCheckedChangeListener(this);
}
use of com.mobsandgeeks.saripaar.Validator in project android-saripaar by ragunathjawahar.
the class OrderedValidateActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_un_ordered_validate);
// UI References
mNameEditText = (EditText) findViewById(R.id.nameEditText);
mAddressEditText = (EditText) findViewById(R.id.addressEditText);
mEmailEditText = (EditText) findViewById(R.id.emailEditText);
mPhoneEditText = (EditText) findViewById(R.id.phoneEditText);
mResultTextView = (TextView) findViewById(R.id.resultTextView);
RadioGroup modeRadioGroup = (RadioGroup) findViewById(R.id.modeRadioGroup);
Button saripaarButton = (Button) findViewById(R.id.saripaarButton);
// Validator
mValidator = new Validator(this);
mValidator.setValidationListener(this);
// Event listeners
modeRadioGroup.setOnCheckedChangeListener(this);
saripaarButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mValidator.validate();
}
});
}
Aggregations