|
@@ -1,5 +1,6 @@
|
|
|
package com.mgtech.base_library.http;
|
|
package com.mgtech.base_library.http;
|
|
|
|
|
|
|
|
|
|
+import android.app.Activity;
|
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import com.mgtech.base_library.R;
|
|
import com.mgtech.base_library.R;
|
|
@@ -24,9 +25,9 @@ public class DialogUtils {
|
|
|
* 显示ProgressDialog
|
|
* 显示ProgressDialog
|
|
|
*/
|
|
*/
|
|
|
public void showProgress(Context context, String msg) {
|
|
public void showProgress(Context context, String msg) {
|
|
|
- /* if (context == null || context.isFinishing()) {
|
|
|
|
|
|
|
+ if (context == null || ((Activity)context).isFinishing()) {
|
|
|
return;
|
|
return;
|
|
|
- }*/
|
|
|
|
|
|
|
+ }
|
|
|
if(mProgressDialog==null){
|
|
if(mProgressDialog==null){
|
|
|
mProgressDialog= new CustomProgressDialog.Builder(context)
|
|
mProgressDialog= new CustomProgressDialog.Builder(context)
|
|
|
.setTheme(R.style.ProgressDialogStyle)
|
|
.setTheme(R.style.ProgressDialogStyle)
|