Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Bug Outer_color make a mixed color with default color #130

Open
reizamv opened this issue Aug 2, 2020 · 3 comments
Open

UI Bug Outer_color make a mixed color with default color #130

reizamv opened this issue Aug 2, 2020 · 3 comments

Comments

@reizamv
Copy link

reizamv commented Aug 2, 2020

if we coding the outer like this
switch.outercolor = R.color.green., and default its blue ...its make dark green because mixed
solution this must delete the first color and add new color..i hope you fix this thanks for the library

@cortinico
Copy link
Owner

switch.outercolor = R.color.green., and default its blue ...its make dark green because mixed
solution this must delete the first color and add new color..i hope you fix this thanks for the library

Can I ask you to be a bit more specific? Maybe provide a code sample or share your project?
If you call .setOuterColor(Color.GREEN) on a SlideToActView the effect is this one:

Screenshot 2020-08-03 at 18 28 33

@reizamv
Copy link
Author

reizamv commented Aug 15, 2020

in xml i use this .setOuterColor(Color.GREEN)
..and then i want to change in another color like red in class switch.outercolor = R.color.red
it became darker green because mixing

Screenshot 2020-08-03 at 18 28 33

@cortinico
Copy link
Owner

then i want to change in another color like red in class switch.outercolor = R.color.red

The problem is that .outercolor expects a ColorInt and not a ColorRes.
You should be good to go with:

switch.outercolor = ContextCompat.getColor(<a valid Context>, R.color.red)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants