use of com.mobsandgeeks.saripaar.Validator in project android-saripaar by ragunathjawahar.
the class CustomAnnotationActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_custom_annotation);
// UI References
mZipCodeEditText = (EditText) findViewById(R.id.zipCodeEditText);
RadioButton registerAnnotationRadioButton = (RadioButton) findViewById(R.id.registerAnnotationRadioButton);
mResultTextView = (TextView) findViewById(R.id.resultTextView);
mSaripaarButton = (Button) findViewById(R.id.saripaarButton);
// Validator
mValidator = new Validator(this);
mValidator.setValidationListener(this);
// Event listeners
registerAnnotationRadioButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
Validator.registerAnnotation(HometownZipCode.class);
}
}
});
mSaripaarButton.setOnClickListener(this);
}
use of com.mobsandgeeks.saripaar.Validator in project android-saripaar by ragunathjawahar.
the class CustomAnnotationWithAdapterActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_custom_annotation_with_adapter);
// UI References
mSeekBar = (SeekBar) findViewById(R.id.seekBar);
mRegisterAnnotationRadioButton = (RadioButton) findViewById(R.id.registerAnnotationRadioButton);
mResultTextView = (TextView) findViewById(R.id.resultTextView);
mSaripaarButton = (Button) findViewById(R.id.saripaarButton);
// Validation
mValidator = new Validator(this);
mValidator.setValidationListener(this);
// Event listeners
mRegisterAnnotationRadioButton.setOnCheckedChangeListener(this);
mSaripaarButton.setOnClickListener(this);
}
use of com.mobsandgeeks.saripaar.Validator in project android-saripaar by ragunathjawahar.
the class CustomMultipleViewDataAdaptersActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_custom_multiple_view_data_adapters);
// UI References
mEmailFloatLabeledEditText = (FloatLabeledEditText) findViewById(R.id.emailFloatLabelEditText);
mMaxFloatLabeledEditText = (FloatLabeledEditText) findViewById(R.id.maxFloatLabelEditText);
mResultTextView = (TextView) findViewById(R.id.resultTextView);
RadioButton registerEmailAdapterRadioButton = (RadioButton) findViewById(R.id.registerEmailAdapterRadioButton);
RadioButton registerMaxAdapterRadioButton = (RadioButton) findViewById(R.id.registerMaxAdapterRadioButton);
Button saripaarButton = (Button) findViewById(R.id.saripaarButton);
// Validator
mValidator = new Validator(this);
mValidator.setValidationListener(this);
// Event listeners
saripaarButton.setOnClickListener(this);
registerEmailAdapterRadioButton.setOnCheckedChangeListener(this);
registerMaxAdapterRadioButton.setOnCheckedChangeListener(this);
}
Aggregations