| | |
| | | import android.content.Context; |
| | | |
| | | import com.dayu.recharge.activity.NewCardActivity; |
| | | import com.tencent.bugly.crashreport.CrashReport; |
| | | |
| | | /** |
| | | * Created by Android Studio. |
| | |
| | | static Dialog dialog; |
| | | |
| | | public static void show(Activity activity) { |
| | | dialog = android.app.ProgressDialog.show(activity, "", "正在通信请稍后", true, true); |
| | | try { |
| | | dialog = android.app.ProgressDialog.show(activity, "", "正在通信请稍后", true, true); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | CrashReport.postCatchedException(e); |
| | | } |
| | | } |
| | | |
| | | public static void dismiss() { |
| | | if (dialog != null) { |
| | | dialog.dismiss(); |
| | | dialog = null; |
| | | try { |
| | | if (dialog != null && dialog.isShowing()) { |
| | | dialog.dismiss(); |
| | | dialog = null; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | CrashReport.postCatchedException(e); |
| | | } |
| | | } |
| | | } |