0

I've been checking some Material Theming examples recently and I found the usage of ?colorPrimary instead of ?attr/colorPrimary is there any difference between them?

Dawid Hyży
  • 3,581
  • 5
  • 26
  • 41
  • 1
    See this: https://stackoverflow.com/a/38165203/1631967 – aminography Jul 29 '20 at 09:20
  • This doesn't answer my question. I'm not asking about the difference between `?android:attr/colorPrimary` and `?attr/colorPrimary` – Dawid Hyży Jul 29 '20 at 09:33
  • You can check the [doc](https://developer.android.com/guide/topics/resources/providing-resources#ReferencesToThemeAttributes): *Because the system resource tool knows that an attribute resource is expected in this context, you do not need to explicitly state the type—you can exclude the attr type* – Gabriele Mariotti Jul 29 '20 at 09:49

0 Answers0