Closed taylorsloan closed 9 years ago
I made some name changes and added the changes you requested.
Oh, I think I couldn't make my point clear. I think it's a better idea to use color ints directly for setColor methods. As for the reason, not always would a user want to use colors from resources. There may be cases when colors generated at runtime may be desired to be used. The methods would look like
setColor(int color) {
mView.setTextColor(color);
}
If anyone wants to use a resource, they'd have to do something like the following:
mErrorView.setErrorTitleColor(context.getResources(getColor(R.color.some_color)));
Ok, seems good. Thanks again!
Np, happy to help
Hi, thanks for contributing! I really appreciate that you followed the general code format too.
One thing though, are you sure it works with
setColor(int res)
when you want to use color resources? I think it should be something likesetColor(context.getResources.getColor(int res))
.We don't really need to get colors from resources in ErrorView though. We could just have
setColor(int color)
methods and the users would get colors from resources before passing them to ErrorView.