Override Resource Values in Android Library Bound in Xamarin - 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?

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.

Related

How to enable Xamarin app as share target in Xamarin.Forms?

I have a Xamarin.Forms application that I would like to enable as a text and/or URL share target. I've done this in a Windows UWP app by handling OnShareTargetActivated, but I don't see an equivalent in Xamarin.Forms. I am willing to use compiler directives if needed; I would prefer that to doing iOS/Android/Windows specific things in the corresponding projects themselves. Right now all my code is in the Xamarin.Forms project and I'd like to keep it that way.
Unfortunately Android and Ios do not have a similar share event so there is no equivalent event in xamarin forms.

Store colors in common project to share between Android and iOS

I'm developing an app with Xamarin.Android and Xamarin.iOS. I would like to keep my color values (hex, rgb, or whatever) in a common project so that they can be accessed by both the Android and iOS projects. Is there a way to do this? I'm also using MvvmCross so is there a plugin for this? Or is this a bad idea?
I'm going to be using the colors in the Android layout files (.xml files) and back-end code for both platforms.
Is there a way to do this? [Share colors between platforms]
Yes, you can use MvxColor.* (With some limitations)
I'm also using MvvmCross so is there a plugin for this?
MvxColor is available via a plugin on NuGet.
Or is this a bad idea? [Share colors between platforms]
Use Case: I'm going to be using the colors in the Android layout files (.xml files) and back-end code for both platforms.
MvxColor will not work directly in XML. But can be used through bindings or assigning colors via the code behind. Therefore, if you want to use any Android XML design time tools with colors then MvxColor will not work.

How to use Custom Renderer in Xamarin Shared Project

I am using Shared Project for my cross platform mobile application and want to use Custom renderer in my app for native support. Is there any way i can use Custom renderer in my app.
There is no difference in-between using custom renders in a PCL or Shared Project as seen here. You still have a project per platform. That doesn't change. The real advantage is that you can use ifdefs when compared to PCLs.
here is all the information you'll need in regards to implementing custom renders. And here is an example of a custom renderer for an Entry.
For Xamarin shared base project we have to set local in xmlns below format
xmlns:local="clr-namespace:Sampleforms"
For Xamarin PCL base project we have to set local in xmlns below format
xmlns:local="clr-namespace:Sampleforms;assembly=Sampleforms"
Reming everything will be same as what do for custom render.

Xamarin.iOS + Xamarin.Forms - custom renderer in an iOS class library not found

I have four libraries all in all, a PCL and three platform-specific class libraries for Android, iOS and Win Phone. I have a base class for a custom Xamarin.Forms view in the PCL and renderers for it in the platform-specific libraries.
In the project where I use the libraries, the OnElementChanged() function of the iOS renderer is never called. I have tested on Android thus far, and there it works and the view gets rendered. Why might this be?
To complicate things, I have used the libraries in another project, where they work seamlessly on all three platforms.
I can provide more information if needed.
As there is not much info...
Make sure ExportRendererAttribute is set for the renderer
Make sure only one renderer available for the Control

Xamarin.Forms on Windows not loading styles from App.Xaml

We have a Xamarin based app targeting iOS, Android, and Windows (not WinPhone but Windows 8.1 as a desktop app for now).
The app utilizes a few PCL's for the vast majority of all views and view models and reusable functionality. The three platform specific projects have very little custom code and, when necessary, inject in custom platform specific services. One of the PCL's also has an App.Xaml that provides the basic styles for the overall app.
The iOS and Android apps load this App.Xaml fine and honor all styles. The Windows implementation of Xamarin.Forms does not appear to load or honor the styles in the same way and our core UI appears blank.
This isn't an issue of the styles just "don't look right" on Windows compared to the other platform but more an issue of everything is invisible. We can click buttons and move around if we know where they would be in the overall UI but we don't see them. Not even an outline.
Not sure what other implementation info I can provide but I'm wondering if anyone else has had issues with Xamarin.Forms on windows and styles?

Resources