26 Star 141 Fork 17

追逐梦想meng / ToastUtils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README.md 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
追逐梦想meng 提交于 2018-03-09 16:43 . v1.0.3

版本计划

  • v1.0.0 添加各式各样的toast,并提供自定义toast
  • v1.1.0 给不同种类的toast加上合适的动画,并提供自定义动画
  • v1.2.0 未完待续...

使用方式

Step 1. Add the JitPack repository to your build file

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
    compile 'com.github.mengpeng920223:ToastUtils:v1.0.3'
}

初始化

 ToastUtils.getInstance().initToast(context);

成功Toast

ToastUtils.onSuccessShowToast( "成功toast")

失败Toast

ToastUtils.onErrorShowToast( "失败toast")

默认Toast

ToastUtils.onDefaultShowToast( "默认toast")

默认没有icon Toast

ToastUtils.onDefaultWithoutIconShowToast( "默认没有 icon toast")

Warn Toast

ToastUtils.onWarnShowToast( "Warn toast")

Info Toast

ToastUtils.onInfoShowToast( "Info toast")

自定义Toast(建议看源码,然后选择构建方式)

ToastUtils.onShowToast(...)
Android
1
https://gitee.com/mengpeng920223/ToastUtils.git
git@gitee.com:mengpeng920223/ToastUtils.git
mengpeng920223
ToastUtils
ToastUtils
master

搜索帮助