LovelyToast
Make u Toast become lovely and alive,
6 kinds of types(6种的toast类型)
3 kinds of show and out animation(3种显示与取消的动画) support custom(支持自定义添加更多)
2 kinds of animation location(可选2种动画位置)
support fast click ,cancel previous animation automatically(支持快速点击,自定取消上次动画)
listen homekey to cancel Toast.(内部作了home键的监听取消Toast)
type :(六种Toast类型分别)
LovelyToast.SUCCESS,
LovelyToast.WARNING,
LovelyToast.ERROR,
LovelyToast.CONFUSING,
LovelyToast..INFO,
LovelyToast.DEFAULT。
showanim :(三种Toast展示动画)
LovelyToast.SCALE
LovelyToast.TOP_DOWN
LovelyToast.LEFT_RIGHT
custom style,(可以自定义)
null=native anim;(不填默认原生动画)
leftorright:(二种动画位置)
LovelyToast.LEFT
LovelyToast.RIGHT
null=LovelyToast.LEFT(不填默认左边动画)
LovelyToast.makeText(mActivity.this, ” hi guys”,LovelyToast.LENGTH_SHORT, LovelyToast.SUCCESS, R.style.customanim , LovelyToast.RIGHT)
//引用自定义写的toast展示与退出动画,必须是R.style下的文件
==================使用方法【AndroidStudio】==================
引入
dependencies { compile 'com.ljs.lovelytoast:LovelyToast:1.0.0' }
调用
LovelyToast.makeText(mActivity.this, " SUCCESS!!", LovelyToast.LENGTH_SHORT, LovelyToast.SUCCESS); LovelyToast.makeText(mActivity.this, " Hi guys !",LovelyToast.LENGTH_SHORT , LovelyToast.SUCCESS, LovelyToast.SCALE , LovelyToast.RIGHT);
实在不会用看作者源代码demo
https://codeload.github.com/anderson9/LovelyToast/zip/master