管灌系统巡查员智能手机App
zuoxiao
2024-12-09 fbb64f0b4151a4fefb90191991aa0fba7b26c52a
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package com.dayu.pipirrapp.net.progress;
 
import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.view.Gravity;
 
 
import com.dayu.pipirrapp.R;
import com.pnikosis.materialishprogress.ProgressWheel;
 
 
/**
 * Copyright (C), 2023,
 * Author: zuo
 * Date: 2023-04-12 9:32
 * Description:
 */
public class NetLoadingDialog extends Dialog {
 
    //private TextView mMessage;
    private AnimationDrawable mAnimationDrawable;
 
 
    public NetLoadingDialog(Context context) {
        super(context, R.style.showSelfDialog);
        init();
    }
 
    private void init() {
        try {
            int ws_pay_net_loading, iv_net_loading_anim;
 
            getWindow().setGravity(Gravity.CENTER);
            setContentView(R.layout.net_loding);
            setCanceledOnTouchOutside(false);
            ProgressWheel wheel = findViewById(R.id.progress_wheel);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
 
 
    public void startAnim() {
        try {
            this.show();
//            mHandler.postDelayed(new Runnable() {
//                @Override
//                public void run() {
//                    mAnimationDrawable.start();
//                }
//            }, 100);
        } catch (Exception e) {
 
        }
    }
 
    public void stopAnim() {
        try {
//            mAnimationDrawable.stop();
            this.dismiss();
        } catch (Exception e) {
 
        }
    }
 
 
}