自定义漂亮的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.csdn.net/detail/qq_35549248/9847624


相关文章:

  • 2021-04-25
  • 2022-02-13
猜你喜欢
  • 2022-12-23
  • 2021-05-24
  • 2021-11-02
  • 2021-12-29
相关资源
相似解决方案