Score
0
Watch 23 Star 93 Fork 16

追逐梦想meng / ToastUtilsAndroid

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
是时候改变一下你的toast了,让你的toast变个样子吧。最简单炫酷的toast,一行代码实现多种提示,关键是简单,好看,你值得拥有。 spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

版本计划

  • 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(...)

Comments ( 4 )

Sign in for post a comment

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

Help Search