自定义漂亮的toast
使用
显示一个错误消息:
Toasty.error(yourContext, "This is an error toast.", Toast.LENGTH_SHORT, true).show();
显示成功消息:
Toasty.success(yourContext, "Success!", Toast.LENGTH_SHORT, true).show();
显示提示消息:
Toasty.info(yourContext, "Here is some info for you.", Toast.LENGTH_SHORT, true).show();
显示警告消息:
Toasty.warning(yourContext, "Beware of the dog.", Toast.LENGTH_SHORT, true).show();
显示不带图标的消息:
Toasty.normal(yourContext, "Normal toast w/o icon").show();
显示带自定义图标的消息:
Toasty.normal(yourContext, "Normal toast w/ icon", yourIconDrawable).show();
显示自定义消息:
Toasty.custom(yourContext, "I'm a custom Toast", yourIconDrawable, textColor, tintColor, duration, withIcon, true).show();
demo下载http://download.****.net/detail/qq_35549248/9847624