Bug 42818 - Missing public setter for _renderersAdded field in FormsAppCompatActivity
Summary: Missing public setter for _renderersAdded field in FormsAppCompatActivity
Status: RESOLVED DUPLICATE of bug 39847
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.1
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-07-26 21:26 UTC by Kelly Adams
Modified: 2017-01-26 00:19 UTC (History)
5 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Kelly Adams 2016-07-26 21:26:16 UTC
Please expose a public property to set the value of _renderersAdded so calling LoadApplication on an activity that inherits from FormsAppCompatActivity doesn't silently unhook your previously registered custom renderers.  The check in question is at https://github.com/xamarin/Xamarin.Forms/blob/be9f626c37949cc56c5f6901dac93093f3016fbf/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs#L107

Repro steps:

1- Create a custom renderer for NavigationPageRenderer, TabbedPageRenderer, MasterDetailPageRenderer, AppCompat.ButtonRenderer, AppCompat.SwitchRenderer, AppCompat.PickerRenderer, AppCompat.FrameRenderer, AppCompat.CarouselPageRenderer
2- Register your renderer in app start up.
3- call LoadApplication on an Activity that inherits from FormsAppCompatActivity.

Expected Results:  Your renderer is available to render your control.

Actual Results:  Your renderer is silently unregistered and the default FormsAppCompat renderer is used in it's place.

This issue is also referenced in bug 38117 (https://bugzilla.xamarin.com/show_bug.cgi?id=38117).
Comment 1 adrianknight89 2016-10-13 16:59:52 UTC
See https://github.com/xamarin/Xamarin.Forms/pull/452
Comment 2 E.Z. Hart [MSFT] 2017-01-26 00:19:14 UTC
This is a duplicate of https://bugzilla.xamarin.com/show_bug.cgi?id=39847 and was fixed in version 2.3.0 (PR https://github.com/xamarin/Xamarin.Forms/pull/112).

*** This bug has been marked as a duplicate of bug 39847 ***