package hf.lskj.com.carstockcount.utils;

import android.content.Context;
import android.text.TextUtils;
import android.widget.Toast;

import hf.lskj.com.carstockcount.MyApplication;

/**
 * Created on 2016/8/1.
 * Author:crs
 * Description:XXX
 */
public class ToastUtils {
    public static void showLong(Context context, String msg) {
        if (TextUtils.isEmpty(msg)){
            return;
        }
        Toast.makeText(context, msg, Toast.LENGTH_LONG).show();
    }

    public static void showShort(Context context, String msg) {
        if (TextUtils.isEmpty(msg)){
            return;
        }
        Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
    }

    public static void showLong(String msg) {
        if (TextUtils.isEmpty(msg)){
            return;
        }
        Toast.makeText(MyApplication.getInstances(), msg, Toast.LENGTH_LONG).show();
    }

    public static void showShort(String msg) {
        if (TextUtils.isEmpty(msg)){
            return;
        }
        Toast.makeText(MyApplication.getInstances(), msg, Toast.LENGTH_SHORT).show();
    }
}
