I have an android class library that contains resources that I want to refer to from within my android application. I want to access styles, for example. Is this possible and if so, what is the syntax I need to use?
I should clarify, I want to access the styles from within an axml file.
These resources should be merged into each other in which you would generally access the same way you would in a Xamarin.Android project.
Sorry Jon, I don't quite follow. Can you show me an example of the syntax I would use to reference a style defined in a class library from an axml file?
When ProjectA references LibraryA, it will "Merge" resources in the sense of combining the resources you can access within ProjectA.
This should merge into one Resource.designer.cs file that you use to then reference the respective style in your XML. For example using the syntax found at the bottom of this doc:
Ah, so there is no need for a package prefix, it should be part of the main apps resources, so "@style/mystyle", for example, should suffice. Ok, thanks.
Sorry to dig this out. I have a Android Library project A which is used as a dependencdy on an Android Application project B. The Resources from A are not available on the final Resource. designer.cs
Is this something that is supposed to work out of the box or is there somethis additional needs to be done.
I am on VS 2019 and targeting Android 10
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies