package com.liunan.myfirstapp.util;

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

/**
 * Toast工具类
 * 能少写就少写
 *
 * Created by 刘楠 on 2016-03-22.
 */
public class ToastUtils {


    /**
     * 弹出短时间提示
     *
     * @param context 上下文
     * @param msg     提示的信息
     */
    public static void showShort(Context context, String msg) {

        Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();

    }


    /**
     * 弹出长时间提示
     *
     * @param context 上下文
     * @param msg     提示的信息
     */
    public static void showLong(Context context, String msg) {

        Toast.makeText(context, msg, Toast.LENGTH_LONG).show();

    }


}

 

相关文章:

  • 2022-12-23
  • 2021-12-13
  • 2021-12-09
  • 2022-12-23
  • 2021-11-28
  • 2021-11-06
  • 2021-06-16
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
相关资源
相似解决方案