Search in sources :

Example 1 with ConsumerForgotPasswordParamsBuilder

use of com.zype.android.webapi.builder.ConsumerForgotPasswordParamsBuilder in project zype-android by zype.

the class LoginActivity method resetPassword.

private void resetPassword() {
    hideKeyboard();
    TextInputLayout layoutEmailReset = findViewById(R.id.layoutEmailReset);
    String email = layoutEmailReset.getEditText().getText().toString();
    if (TextUtils.isEmpty(email)) {
        layoutEmailReset.setError(getString(R.string.error_field_required));
        return;
    } else if (!isEmailValid(email)) {
        layoutEmailReset.setError(getString(R.string.error_invalid_email));
        return;
    }
    showProgress(true);
    ConsumerForgotPasswordParamsBuilder builder = new ConsumerForgotPasswordParamsBuilder();
    builder.addEmail(email);
    getApi().executeRequest(WebApiManager.Request.CONSUMER_FORGOT_PASSWORD, builder.build());
}
Also used : ConsumerForgotPasswordParamsBuilder(com.zype.android.webapi.builder.ConsumerForgotPasswordParamsBuilder) SpannableString(android.text.SpannableString) TextInputLayout(com.google.android.material.textfield.TextInputLayout)

Aggregations

SpannableString (android.text.SpannableString)1 TextInputLayout (com.google.android.material.textfield.TextInputLayout)1 ConsumerForgotPasswordParamsBuilder (com.zype.android.webapi.builder.ConsumerForgotPasswordParamsBuilder)1