question

BenjaminWalpole-5318 avatar image
0 Votes"
BenjaminWalpole-5318 asked RobCaplan edited

Override Resource Values in Android Library Bound in Xamarin

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?

dotnet-xamarin
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Does binding .AAR depends on other .AAR?And make sure this ARR file contains this style? ARR file are store resources separately.

0 Votes 0 ·

The binding is only a single AAR and we can see that the colours are being defined within the AAR. We can also see these default values being used when the SDK shows its UI, what we aren't able to do is override these values so can customise the styling.

0 Votes 0 ·

1 Answer

BenjaminWalpole-5318 avatar image
0 Votes"
BenjaminWalpole-5318 answered LeonLu-MSFT commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your sharing.

0 Votes 0 ·