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

.setBackgroundColors gives an error when I give it a valid color #11

Closed
kiaanpillay opened this issue Feb 3, 2016 · 2 comments
Closed

Comments

@kiaanpillay
Copy link

android.content.res.Resources$NotFoundException: Resource ID #0xffd4e157 return when I give it a valid colour, what values are we supposed to use when changing it programatically?

I see you have called it like this:

public void setBackgroundColors(int bgColorRes, int bgPressedColorRes) {
this.backgroundColorPressed = this.getResources().getColor(bgPressedColorRes);
this.backgroundColor = this.getResources().getColor(bgColorRes);
this.updateColors();
}

Why is it not just:

public void setBackgroundColors(int bgColorRes, int bgPressedColorRes) {
this.backgroundColorPressed = bgPressedColorRes;
this.backgroundColor = bgColorRes;
this.updateColors();
}

Perhaps I am missing some logic? I could just be very confused. Please help and give an example, thank you very much. Love the library

@himanshu-soni
Copy link
Owner

Hi @kiaanpillay
I have updated library and used annotation library to clarify your issue. please check v1.0.4

@kiaanpillay
Copy link
Author

Thank you very much!

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

No branches or pull requests

2 participants