In my NativeScript project, I have a color defined in App_Resources/Android/src/main/res/values/colors.xml:
<resources>
...
<color name="notification">#00546A</color>
</resources>
Now I try to access the value of the defined color like this:
utils.ad.getApplicationContext().getResources().getColor(
android.R.color.notification,
null
)
But I always get:
android.content.res.Resources&NotFoundException: Resource ID #0x0
I also tried:
android.support.v4.content.ContextCompat.getColor(
utils.ad.getApplicationContext(),
android.R.color.notification
)
... but same result.
Does anybody have a hint?