Search in sources :

Example 1 with VerificationError

use of com.stepstone.stepper.VerificationError in project AlphaTour by Frank99DG.

the class Step1 method verifyStep.

@Nullable
@Override
public VerificationError verifyStep() {
    VerificationError error = null;
    String NamePath = namePath.getText().toString();
    String PlacePath = placePath.getText().toString();
    String DescriptionPath = descriptionPath.getText().toString();
    errorFlag = inputControl(NamePath, PlacePath, DescriptionPath);
    if (errorFlag) {
        error = new VerificationError("Compila tutti i campi");
    } else {
        if (Step4.getZoneAndObjectList_() != null) {
            if (Step4.getZoneAndObjectList_().size() != 0) {
                Step4.getZoneAndObjectList_().get(0).setName(NamePath);
                Step4.getZoneAndObjectList_().get(0).setDescription(DescriptionPath);
            }
        }
        Place = PlacePath;
        Step2.setPlace(PlacePath);
        PercorsoWizard.setNamePath(NamePath);
        PercorsoWizard.setDescriptionPath(DescriptionPath);
    }
    return error;
}
Also used : VerificationError(com.stepstone.stepper.VerificationError) Nullable(androidx.annotation.Nullable)

Example 2 with VerificationError

use of com.stepstone.stepper.VerificationError in project AlphaTour by Frank99DG.

the class Step2 method verifyStep.

@Nullable
@Override
public VerificationError verifyStep() {
    VerificationError error = null;
    for (int i = 0; i < arrayZone.size(); i++) {
        if (!arrayZone.get(i).isChecked()) {
            control = false;
        } else {
            control = true;
            zona_scelta = i;
            DashboardActivity.setZona_scelta(array_database.get(i));
            return null;
        }
    }
    if (control == false)
        error = new VerificationError("Seleziona una zona prima di andare avanti");
    return error;
}
Also used : VerificationError(com.stepstone.stepper.VerificationError) Constraint(com.example.alphatour.oggetti.Constraint) Nullable(androidx.annotation.Nullable)

Example 3 with VerificationError

use of com.stepstone.stepper.VerificationError in project AlphaTour by Frank99DG.

the class Step3 method verifyStep.

@Nullable
@Override
public VerificationError verifyStep() {
    VerificationError error = null;
    control = false;
    for (int a = 0; a < arrayMonumenti.size(); a++) {
        // ciclo per contare quanti sono checkati
        if (arrayMonumenti.get(a).isChecked()) {
            // salvataggio degli oggetti scelti
            oggetti_scelti.add(arrayStringElement.get(a));
            Step4.getOggetti_select().add(arrayStringElement.get(a));
            control = true;
        }
    }
    if (control) {
        MapZoneAndObject zoneAndObject = new MapZoneAndObject(DashboardActivity.getZona_scelta(), oggetti_scelti, PercorsoWizard.getNamePath(), PercorsoWizard.getDescriptionPath());
        zoneAndObjectList.add(zoneAndObject);
    }
    if (control == false) {
        error = new VerificationError("Seleziona almeno un oggetto");
        return error;
    }
    return null;
}
Also used : VerificationError(com.stepstone.stepper.VerificationError) MapZoneAndObject(com.example.alphatour.oggetti.MapZoneAndObject) Nullable(androidx.annotation.Nullable)

Example 4 with VerificationError

use of com.stepstone.stepper.VerificationError in project AlphaTour by Frank99DG.

the class CreatePlaceWizard method verifyStep.

@Nullable
@Override
public VerificationError verifyStep() {
    VerificationError error = null;
    NamePlace = namePlace.getText().toString();
    City = city.getText().toString();
    Typology = typology.getText().toString();
    errorFlag = inputControl(NamePlace, City, Typology);
    if (errorFlag) {
        error = new VerificationError("Compila tutti i campi");
    }
    return error;
}
Also used : VerificationError(com.stepstone.stepper.VerificationError) Nullable(androidx.annotation.Nullable)

Aggregations

Nullable (androidx.annotation.Nullable)4 VerificationError (com.stepstone.stepper.VerificationError)4 Constraint (com.example.alphatour.oggetti.Constraint)1 MapZoneAndObject (com.example.alphatour.oggetti.MapZoneAndObject)1