app/src/main/java/me/zhanghai/android/douya/util/ToastUtils.java
(完整代码) 1013B/*
* Copyright (c) 2015 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com>
* All Rights Reserved.
*/
package me.zhanghai.android.douya.util;
import android.content.Context;
import android.widget.Toast;
public class ToastUtils {
private ToastUtils() {}
public static void show(CharSequence text, int duration, Context context) {
Toast.makeText(context, text, duration).show();
}
public static void show(int resId, int duration, Context context) {
show(context.getText(resId), duration, context);
}
public static void show(CharSequence text, Context context) {
show(text, Toast.LENGTH_SHORT, context);
}
public static void show(int resId, Context context) {
show(context.getText(resId), context);
}
public static void showLong(CharSequence text, Context context) {
show(text, Toast.LENGTH_LONG, context);
}
public static void showLong(int resId, Context context) {
showLong(context.getText(resId), context);
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
