GithubHelp home page GithubHelp logo

Comments (11)

GrenderG avatar GrenderG commented on July 28, 2024 2

You are right, go ahead with the PR.

from toasty.

programmerr47 avatar programmerr47 commented on July 28, 2024

If you don't mind, I can do that

from toasty.

GrenderG avatar GrenderG commented on July 28, 2024

What do you mean with 2.?

from toasty.

GrenderG avatar GrenderG commented on July 28, 2024

ping @programmerr47

from toasty.

programmerr47 avatar programmerr47 commented on July 28, 2024

@GrenderG Hi. Sorry for such delay.

I mean next:
private int DEFAULT_TEXT_COLOR = Toasty.DEFAULT_TEXT_COLOR;
Here is an example of a config field. Since it is written in ALL_CAPS_SNAKE_CASE and it is a common practice for naming constants, you may not notice lack of static final keywords and thus erroneously assume, that it is a constant.
Situation is become more obscure, when you see, that:
private static int DEFAULT_TEXT_COLOR = Color.parseColor("#FFFFFF");
is not just a field of an object, but a field of a class, written in a constant style

See jls for more information. For more easy search page 138, item Field Names :)

from toasty.

sami286 avatar sami286 commented on July 28, 2024

Hi, im working on that.
Should I continue supporting to change default color by Toasty.Config? Or should it be done entirely from resources?

from toasty.

sami286 avatar sami286 commented on July 28, 2024

Just tell me what do you want your library to do and I will implement it :)
@GrenderG

from toasty.

GrenderG avatar GrenderG commented on July 28, 2024

I'm just not sure about how to implement this. I don't want to remove support for @ColorInt, but I know that it would be good to exclude default color variables to resources and / or support theming via color resources, although this can actually be done at this moment using getColor(...) / ContextCompat.getColor(...) methods.

What do you guys think?

from toasty.

sami286 avatar sami286 commented on July 28, 2024

Have a look to the way I implement it, it is now by default getting default color from resources but it is also posible to override them throught the config at run time.

Maybe we shouldn't give an option to override default colors at run time and instead the developers would use Toasty.custom (?)

from toasty.

GrenderG avatar GrenderG commented on July 28, 2024

Maybe we shouldn't give an option to override default colors at run time and instead the developers would use Toasty.custom (?)

Okay! I agree with this.

from toasty.

sami286 avatar sami286 commented on July 28, 2024

Maybe we shouldn't give an option to override default colors at run time and instead the developers would use Toasty.custom (?)

Okay! I agree with this.

Done! Have a look at it and tell me what you think 😄
#93

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.