This repository was archived by the owner on Nov 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
library/src/main/java/br/com/ilhasoft/support/validation
sample/src/main/java/br/com/ilhasoft/support/validation/sample Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,12 +174,12 @@ public class YourActivity extends AppCompatActivity implements Validator.Validat
174174 }
175175
176176 @Override
177- public void onSuccess () {
177+ public void onValidationSuccess () {
178178 saveToDatabase();
179179 }
180180
181181 @Override
182- public void onError () {
182+ public void onValidationError () {
183183 Toast.makeText(YourActivity.this, "Dados inválidos!", Toast.LENGTH_SHORT).show();
184184 }
185185}
Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ public void toValidate() {
3939 if (validationListener == null ) throw new IllegalArgumentException ("Validation listener should not be null." );
4040
4141 if (validate ()) {
42- validationListener .onSuccess ();
42+ validationListener .onValidationSuccess ();
4343 } else {
44- validationListener .onError ();
44+ validationListener .onValidationError ();
4545 }
4646 }
4747
@@ -114,8 +114,8 @@ private List<View> getViewsWithValidation(View view) {
114114
115115 public interface ValidationListener {
116116
117- void onSuccess ();
117+ void onValidationSuccess ();
118118
119- void onError ();
119+ void onValidationError ();
120120 }
121121}
Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ public class MainActivity extends AppCompatActivity implements Validator.Validat
2020 private Validator validator ;
2121
2222 @ Override
23- public void onSuccess () {
23+ public void onValidationSuccess () {
2424 saveToDatabase ();
2525 }
2626
2727 @ Override
28- public void onError () {
28+ public void onValidationError () {
2929 Toast .makeText (MainActivity .this , "Dados inválidos!" , Toast .LENGTH_SHORT ).show ();
3030 }
3131
You can’t perform that action at this time.
0 commit comments