Override Resource Values in Android Library Bound in Xamarin

Benjamin Walpole 96 Reputation points
2021-05-10T07:21:52.027+00:00

We have created a Xamarin binding for a 3rd party library Android library that we need to use in our Xamarin Android app, the library is in the form of an AAR.

Since the library presents UI it has an option for customising certain colours etc by redefining resource values within the app, for example:

<resources>
   <color name="ThirdParty_accent">#9200aa</color>
   <color name="ThirdParty_accentDark">#76008a</color>
   <color name="ThirdParty_accentLight">#be7cca</color>
</resources>

This mechanism doesn't seem to be working with the bound library, when we define these values within our app they don't override the defaults defined in the AAR.

Is this something that is supported within a Xamarin binding? Is there a particular technique we need to use?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,253 questions
{count} votes

Accepted answer
  1. Benjamin Walpole 96 Reputation points
    2021-05-18T14:21:12.19+00:00

    This actually turned out to be caused by typos in the documentation for the resources we were needing to re-define.

    It seems this does work through a Xamarin bound library.


0 additional answers

Sort by: Most helpful