rk
昨天 4a8ff39b0fab0627ef8f7459587d514cc01c3676
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
30
31
32
33
34
35
36
37
38
39
40
package com.doumee.lib_coremodel.base;
 
import android.app.Dialog;
import android.content.Context;
import android.view.Gravity;
 
import androidx.annotation.NonNull;
 
import com.doumee.lib_coremodel.R;
 
 
/**
 * @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
 */
public class BaseProgressDialog extends Dialog {
 
    public static BaseProgressDialog newInstance(Context context) {
        return new BaseProgressDialog(context);
    }
 
    public BaseProgressDialog(@NonNull Context context) {
        this(context, R.style.mvvmframe_progress_dialog);
    }
 
    public BaseProgressDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);
        initUI();
    }
 
    public BaseProgressDialog(@NonNull Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
        initUI();
    }
 
    private void initUI() {
        getWindow().getAttributes().gravity = Gravity.CENTER;
        setCanceledOnTouchOutside(false);
    }
 
}