当前位置: 首页>>代码示例>>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;未经允许,请勿转载。