當前位置: 首頁>>代碼示例>>Java>>正文


Java SweetAlertDialog.ERROR_TYPE屬性代碼示例

本文整理匯總了Java中cn.pedant.SweetAlert.SweetAlertDialog.ERROR_TYPE屬性的典型用法代碼示例。如果您正苦於以下問題:Java SweetAlertDialog.ERROR_TYPE屬性的具體用法?Java SweetAlertDialog.ERROR_TYPE怎麽用?Java SweetAlertDialog.ERROR_TYPE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在cn.pedant.SweetAlert.SweetAlertDialog的用法示例。


在下文中一共展示了SweetAlertDialog.ERROR_TYPE屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onValidationFailed

@Override
public void onValidationFailed(List<ValidationError> errors) {
    final SweetAlertDialog errorDialog = new SweetAlertDialog(this, SweetAlertDialog.ERROR_TYPE);
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(this);

        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            errorDialog.setTitleText("Oops...");
            errorDialog.setContentText(message);
            errorDialog.show();
            return;
        }
    }
}
 
開發者ID:CycloneAxe,項目名稱:phphub-android,代碼行數:17,代碼來源:TopicPublishActivity.java

示例2: validationContent

public void validationContent() {
    SweetAlertDialog errorDialog = new SweetAlertDialog(this, SweetAlertDialog.ERROR_TYPE);
    SweetAlertDialog loadingDialog = new SweetAlertDialog(this, SweetAlertDialog.PROGRESS_TYPE);
    String reply = topicBodyView.getText().toString();

    if (reply.trim().length() < 2) {
        errorDialog.setTitleText("Oops...");
        errorDialog.setContentText(getString(R.string.body_input_error));
        errorDialog.show();
        return;
    }

    loadingDialog.getProgressHelper().setBarColor(Color.parseColor("#4394DA"));
    loadingDialog.setContentText(getString(R.string.submitting));
    loadingDialog.setCancelable(false);
    loadingDialog.show();

    getPresenter().request(topicId, reply, loadingDialog);
}
 
開發者ID:CycloneAxe,項目名稱:phphub-android,代碼行數:19,代碼來源:TopicReplyActivity.java

示例3: verifyProfile

private void verifyProfile() {
    SweetAlertDialog errorDialog = new SweetAlertDialog(this, SweetAlertDialog.ERROR_TYPE);
    SweetAlertDialog loadingDialog = new SweetAlertDialog(this, SweetAlertDialog.PROGRESS_TYPE);

    String username = userNameView.getText().toString();
    String city = addressView.getText().toString();
    String twitter = twitterView.getText().toString();
    String github = githubView.getText().toString();
    String blog = blogView.getText().toString();
    String des = desView.getText().toString();

    if (TextUtils.isEmpty(username)) {
        errorDialog.setTitleText("Oops...");
        errorDialog.setContentText(getString(R.string.username_error));
        errorDialog.show();
        return;
    }

    userInfo.setName(username);
    userInfo.setCity(city);
    userInfo.setTwitterAccount(twitter);
    userInfo.setGithubName(github);
    userInfo.setPersonalWebsite(blog);
    userInfo.setIntroduction(des);

    loadingDialog.getProgressHelper().setBarColor(Color.parseColor("#4394DA"));
    loadingDialog.setContentText(getString(R.string.submitting));
    loadingDialog.setCancelable(false);
    loadingDialog.show();

    getPresenter().request(userInfo);

    loadingDialog.dismiss();
}
 
開發者ID:CycloneAxe,項目名稱:phphub-android,代碼行數:34,代碼來源:EditUserProfileActivity.java

示例4: onNetWorkError

public void onNetWorkError(Throwable throwable) {
    Logger.e(throwable.getMessage());
    SweetAlertDialog errorDialog = new SweetAlertDialog(this, SweetAlertDialog.ERROR_TYPE);
    errorDialog.setTitleText("Oops...");
    errorDialog.setContentText(getString(R.string.publish_error));
    errorDialog.show();
}
 
開發者ID:CycloneAxe,項目名稱:phphub-android,代碼行數:7,代碼來源:EditUserProfileActivity.java

示例5: onNetWorkError

public void onNetWorkError(Throwable throwable, SweetAlertDialog loadingDialog) {
    Logger.e(throwable.getMessage());
    loadingDialog.dismiss();

    SweetAlertDialog errorDialog = new SweetAlertDialog(this, SweetAlertDialog.ERROR_TYPE);
    errorDialog.setTitleText("Oops...");
    errorDialog.setContentText(getString(R.string.publish_error));
    errorDialog.show();

}
 
開發者ID:CycloneAxe,項目名稱:phphub-android,代碼行數:10,代碼來源:TopicReplyActivity.java

示例6: trySubmit

public void trySubmit() {
    String validate = validateSubmit();
    if (TextUtils.isEmpty(validate)) {
        showSubmitProgressing();
        if (isAllBitMapUploaded()) {
            submit();
        }
    } else {
        SweetAlertDialog loadDialog = new SweetAlertDialog(this, SweetAlertDialog.ERROR_TYPE);
        loadDialog.setTitleText(validate);
        loadDialog.setConfirmText(getString(R.string.ct_i_know));
        loadDialog.setCancelable(false);
        loadDialog.show();
    }
}
 
開發者ID:MoonRune,項目名稱:CuiTrip,代碼行數:15,代碼來源:SelfHomePageEditorActivity.java


注:本文中的cn.pedant.SweetAlert.SweetAlertDialog.ERROR_TYPE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。