Issue
I am trying to get a color from colors.xml
, using something along the lines of
view.setBackgroundColor(getResources().getColor(R.color.bgcolor_view));
Although there is a R.color.bgcolor_view
in my colors.xml
file, the R.color
part only shows colors that are available in the built-in android settings. So I'm assuming that getResources()
is not getting the resources from my project.
So, my question is, how do I obtain resources from within a SherlockFragment?
Solution
Look at your imports, you probably imported android.R, so remove this import and double check that you import your own R from your own project.
Answered By - Snicolas
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.