inmite / android-validation-komensky

A simple library for validating user input in forms using annotations.
Apache License 2.0
508 stars 78 forks source link

Don't work @Condition with android.app.Fragment #24

Closed maimuzo closed 9 years ago

maimuzo commented 9 years ago

in FormValidator.evaluateCondition():

    if (target instanceof Activity) {
        conditionView = ((Activity) target).findViewById(viewId);
    } else if (target instanceof Fragment) {
        conditionView = ((Fragment) target).getView().findViewById(viewId);
    } else if (target instanceof View) {
        conditionView = ((View) target).findViewById(viewId);
    } else {
        throw new FormsValidationException("unknown target " + target);
    }

this class imports android.support.v4.app.Fragment

tomas-vondracek commented 9 years ago

fixed by 483c72c050a8c020c83094bad6de505150738d20