管灌系统巡查员智能手机App
app/src/main/java/com/dayu/pipirrapp/utils/ToastUtil.java
@@ -15,24 +15,38 @@
    }
    public static void showToastShort(Context context, String s) {
        if (s != null) {
            if (!TextUtils.isEmpty(s))
        if (!TextUtils.isEmpty(s)) {
            if (context != null) {
                if (!TextUtils.isEmpty(context.getPackageName())) {
                makeText(context, s, Toast.LENGTH_SHORT).show();
        }
            }
        }
    }
    public static void showToastLong(Context context, String s) {
        if (!TextUtils.isEmpty(s)) {
            if (context != null) {
                if (!TextUtils.isEmpty(context.getPackageName())) {
            makeText(context, s, Toast.LENGTH_LONG).show();
                }
            }
        }
    }
    public static void showToast(Context context, String s) {
        if (s != null) {
            if (context != null) {
                if (!TextUtils.isEmpty(context.getPackageName())) {
            makeText(context, s, Toast.LENGTH_LONG).show();
        }
    }
        }
    }
    public static void showToast(Context context, int resId) {
        showToastLong(context, context.getString(resId));
    }