Snacky icon indicating copy to clipboard operation
Snacky copied to clipboard

Configuring default settings via singleton

Open usernotnull opened this issue 6 years ago • 0 comments

I love how this library replicates Toasty, but one thing it's lacking is the same configuration of each success, error, etc…

In Toasty you can do this with:

Toasty.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

Can it be done here?

usernotnull avatar Apr 03 '18 15:04 usernotnull