Reputation: 4119
I'm getting some strange behaviour while getting the stored color value from resource. I have created a file named v_color.xml in values folder.
<resources>
<color name="Blue_ICS">#000099CC</color>
</resources>
whose decimal value should be = 39372. But when i'm putting this in log,
Log.e(TAG, "Color="+R.color.Blue_ICS);
im getting value Color=2131296268. So can anyone tell,where i'm going wrong here?
Upvotes: 0
Views: 199
Reputation: 7051
You're checking the pointer.
Use
Log.e(TAG, "Color="+getResources().getColor(R.color.Blue_ICS));
Upvotes: 4