Toast 工具类:

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

/**
 * Toast 弹出信息工具类,简化代码编写
 * @author fairy
 * */
public class SmartToastUtils {
    public static void showLong(Context context, String info) {
        Toast.makeText(context, info, Toast.LENGTH_LONG).show();
    }
    public static void showShort(Context context,String info) {
        Toast.makeText(context, info,Toast.LENGTH_SHORT).show();
    }
}
View Code

相关文章:

  • 2021-10-05
  • 2021-11-23
  • 2021-11-21
  • 2021-12-07
  • 2021-12-17
  • 2021-12-18
  • 2022-01-19
  • 2022-02-04
猜你喜欢
  • 2021-10-25
  • 2022-02-04
  • 2022-01-04
  • 2021-12-20
  • 2021-04-17
  • 2021-12-29
  • 2021-12-25
相关资源
相似解决方案