compile 'cn.pedant.sweetalert:library:1.2'
![](https://i-blog.csdnimg.cn/blog_migrate/3bbec5cdbea6abe2c68531ccc0ceebe1.gif)
new SweetAlertDialog(ZuZhuangActivity.this, SweetAlertDialog.WARNING_TYPE)
.setTitleText("组装即将进行")
.setContentText("")
.setCancelText("返回")
.setConfirmText("确定")
.showCancelButton(true)
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public void onClick(SweetAlertDialog sDialog) {
sDialog.dismissWithAnimation();
}
});
}
})
.setCancelClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public void onClick(SweetAlertDialog sweetAlertDialog) {
sweetAlertDialog.dismiss();
}
})
.show();
compile 'cn.pedant.sweetalert:library:1.2'
![](https://i-blog.csdnimg.cn/blog_migrate/3bbec5cdbea6abe2c68531ccc0ceebe1.gif)
new SweetAlertDialog(ZuZhuangActivity.this, SweetAlertDialog.WARNING_TYPE)
.setTitleText("组装即将进行")
.setContentText("")
.setCancelText("返回")
.setConfirmText("确定")
.showCancelButton(true)
.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public void onClick(SweetAlertDialog sDialog) {
sDialog.dismissWithAnimation();
}
});
}
})
.setCancelClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public void onClick(SweetAlertDialog sweetAlertDialog) {
sweetAlertDialog.dismiss();
}
})
.show();