An Easy-to-use Kotlin based Customizable Library with Material Layouts by @blackbeared.
A pre-styled toasts with fully customization facility.
AwesomeToast.success(this@Dashboard, "Green Success Toast").show()
AwesomeToast.info(this@Dashboard, "Cyan Information Toast").show()
AwesomeToast.warning(this@Dashboard, "Orange Warning Toast").show()
AwesomeToast.error(this@Dashboard, "Red Error Toast").show()
AwesomeToast.Config.getInstance()
.setErrorColor(@ColorInt int errorColor) // optional
.setInfoColor(@ColorInt int infoColor) // optional
.setSuccessColor(@ColorInt int successColor) // optional
.setWarningColor(@ColorInt int warningColor) // optional
.setTextColor(@ColorInt int textColor) // optional
.tintIcon(boolean tintIcon) // optional (apply textColor also to the icon)
.setToastTypeface(@NonNull Typeface typeface) // optional
.setTextSize(int sizeInSp) // optional
.apply(); // required
You can reset the configuration by using reset() method:
AwesomeToast.Config.reset();
Use the above code to show different type of messages as well as add the customization code to your Launcher activity to customise toasts.