package com.naz.sdkdemo.weight;

import android.widget.Toast;

import com.naz.sdkdemo.utils.ContextUtil;

/**
 * Description:
 * Author: ydd
 * Date:2020/10/27
 */
public class XToast {
    private static Toast toast;

    public static void showToast(int text) {
        showToast(ContextUtil.getmCtx().getText(text).toString());
    }

    public static void showToast(String text) {
        if (toast == null) {
            toast = Toast.makeText(ContextUtil.getmCtx(), null, Toast.LENGTH_SHORT);
        }
        toast.setText(text);
        toast.show();
    }
}