package com.dayu.qiheonlinelibrary.net.progress;
|
|
import android.app.Dialog;
|
import android.content.Context;
|
import android.graphics.drawable.AnimationDrawable;
|
import android.view.Gravity;
|
|
import com.dayu.qiheonlinelibrary.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, com.dayu.baselibrary.R.style.ws_pay_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) {
|
|
}
|
}
|
|
|
}
|