拿去用就好了
...
public class ToastUtil {
public static void showShort(Context context, CharSequence message) {
Toast toast = Toast.makeText(context, null, Toast.LENGTH_SHORT);
toast.setText(message);
toast.show();
}
public static void showLong(Context context, CharSequence message) {
Toast toast = Toast.makeText(context, null, Toast.LENGTH_LONG);
toast.setText(message);
toast.show();
}
}
...
网友评论