package com.ydl.ydlnet.utils;

import android.widget.Toast;
import com.ydl.ydlnet.YDLHttpUtils;

/**
 * Created by haorui on 2019-09-02 .
 * Des:
 */
public class NetToastUtils {

    private static Toast mToast;

    /**
     * Toast提示
     *
     * @param msg 提示内容
     */
    public static void showToast(String msg) {
        if (mToast == null) {
            mToast = Toast.makeText(YDLHttpUtils.Companion.getContext(), msg, Toast.LENGTH_SHORT);
        } else {
            mToast.setText(msg);
        }
        mToast.show();
    }
}
