【开源】loadtoast
loadtoast
- https://github.com/code-mc/loadtoast
介绍:
默认的toast很丑,而且也没有真正提供显示短暂消息的功能。这个库能为toast显示动画反馈,显示到选择按钮或者删除按钮的过度动画。而且toast 的生命周期是完全取决于你的。运行效果:
![]()
使用说明:
Gradle
|
1
2
3
|
dependencies { compile 'net.steamcrafted:load-toast:1.0.3'} |
通过context创建
|
1
|
LoadToast lt = new LoadToast(context); |
设置显示的文字
|
1
|
lt.setText("Sending Reply..."); |
显示
|
1
|
lt.show(); |
反馈信息
|
1
2
3
4
5
|
// Call this if it was successfullt.success();// Or this method if it failedlt.error(); |
为toast的不同元素设置颜色
|
1
|
lt.setTextColor(Color.RED).setBackgroundColor(Color.GREEN).setProgressColor(Color.BLUE); |
posted on 2015-05-08 11:43 wasdchenhao 阅读(97) 评论(0) 收藏 举报

浙公网安备 33010602011771号