haijiang
2018-06-25 586f13d3aa93fc3fdfed65021b1a17a17acf3321
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
    }
 
}