package com.moral.andbrickslib.utils.dialog;
|
|
import android.content.Context;
|
|
import com.moral.andbrickslib.views.SweetAlert.SweetAlertDialog;
|
|
|
/**
|
* 弹出对话框工具类
|
* 使用https://github.com/pedant/sweet-alert-dialog
|
* Created by haijiang on 2017/4/25.
|
*/
|
|
public class SweetDialogUtils {
|
/**
|
*加载dialog
|
* @param context
|
* @param color
|
* @return
|
*/
|
public static SweetAlertDialog showProgressDialog(Context context, String content, int color){
|
SweetAlertDialog dialog = new SweetAlertDialog(context, SweetAlertDialog.PROGRESS_TYPE);
|
dialog.getProgressHelper().setBarColor(context.getResources().getColor(color));
|
dialog.setCanceledOnTouchOutside(true);
|
dialog.setTitleText(content);
|
return dialog;
|
}
|
|
}
|