I\'m searching way to get Android system colors - color theme used in device.
Using android:color/
I didn\'t get correct colors.
For example: background col
Thanks for rekire :)
Finally I have the answer: Android: How to get background color of Activity in Java?
TypedArray array = getTheme().obtainStyledAttributes(new int[]{android.R.attr.colorBackground,});
int backgroundcolor = array.getColor(0, 0xFF00FF);
It might just be setting a color filter on whatever the base color of the device is. That may be why you're not getting the base color you were expecting.
This is just a theory, I haven't verified it yet. Either that, or the base color for the theme you're looking is stored in a slightly different location. That's also a possibility.
You can get android system color using
android:textColor="@android:color/black"
And this is working fine