Hello! I am having problems trynig to access the `...
# android
e
Hello! I am having problems trynig to access the
R.attr
while theming my app. I am trying to get the color of the theme in this way:
Copy code
val color = TypedValue().let {
   view.context.theme.resolveAttribute(R.attr.colorPrimaryContainer, it, true)
   ContextCompat.getColor(view.context, it.resourceId)
}
But it is not being resolved
R.attr.colorPrimaryContainer
. It looks that I can not access any of the attributes of my own package. Instead, all the suggestions in the autocompletion are from external packages. Any idea how I can get the values of my theme?
not kotlin but kotlin colored 1