GithubHelp home page GithubHelp logo

Comments (7)

GrenderG avatar GrenderG commented on September 2, 2024

Hello @searchy2, sorry for any inconveniences. You can change the text color and more parameters with this (check the README.md):

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
    .setToastTypeface(AssetManager assetManager, String fontPath) // optional
    .apply(); // required

EDIT: The icon is being tinted along with the text color, but if you want I can add a feature to turn that off. (Ex: tintIcon(boolean)).
EDIT2: In fact I'm gonna add it, wait for version 1.2.2.

from toasty.

GrenderG avatar GrenderG commented on September 2, 2024

Okay, now all the options are:

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(AssetManager assetManager, String fontPath) // optional
    .apply(); // required

Remember to update to version 1.2.2.

from toasty.

rayliverified avatar rayliverified commented on September 2, 2024

Thanks for the care you put into the library and continually making it better. I think I understand how the changes work. I have one question that I am still confused about that I hope you can clear up.

Is there a method to set the color of a custom toast? I see that you can set Info, Error, and Warning toast colors. How do you set it for the custom toast? Thanks!

from toasty.

GrenderG avatar GrenderG commented on September 2, 2024

Thanks for your words. You can still change a custom Toast color the same way as before. The custom() method accepts a @ColorInt int tintColor parameter which corresponds to the color that the Toast will have.

from toasty.

rayliverified avatar rayliverified commented on September 2, 2024

Oh! I thought the tint color was used to specify the color for the text and icon. I did not realize that it was for the background color. Will try to upgrade now, hopefully everything goes smoothly!

from toasty.

GrenderG avatar GrenderG commented on September 2, 2024

Hope it goes smoothly. 😄 By the way, I've released version 1.2.3. The only noticeable changes take place on this method:

.setToastTypeface(@NonNull Typeface typeface) // optional

Now it accepts a Typeface object.

from toasty.

rayliverified avatar rayliverified commented on September 2, 2024

Everything works smoothly!

from toasty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.