package com.hw.nativeapp.utils;

import android.app.Activity;
import android.app.ProgressDialog;

import com.hw.nativeapp.ui.dialogs.LoadingDialog;

public class MaskUtil {

    public static ProgressDialog showProgressDialog(String message, Activity activity){
        ProgressDialog mProgressDialog = null;
        if (mProgressDialog == null){
            mProgressDialog = new ProgressDialog(activity);
            mProgressDialog.setCanceledOnTouchOutside(false);
            mProgressDialog.setCancelable(false);
        }
        mProgressDialog.setMessage(message);
        if(!mProgressDialog.isShowing()){
            mProgressDialog.show();
        }
        return mProgressDialog;
    }
}
