使用
顯示一個錯誤消息:
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