Bug 27202 - Renderers do not pop out
Summary: Renderers do not pop out
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-02-19 00:00 UTC by Anubhav Ranjan
Modified: 2015-03-05 06:35 UTC (History)
4 users (show)

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

Zip Xamarin Logs (9.75 KB, application/octet-stream)
2015-02-19 05:39 UTC, Udham Singh

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 Anubhav Ranjan 2015-02-19 00:00:04 UTC
One of our customer is facing the issue where the Renderer does not pop out:


I am developing a Xamarin android app using Xamarin forms. I have a Xamarin
forms page in which I push a custom renderer in the navigation.
The custom renderer uses a .axml file to set the activity SetContentView in
the renderer.

*protected override void OnElementChanged
(ElementChangedEventArgs<Xamarin.Forms.Page> eventArgs)*
* {*
* base.OnElementChanged (eventArgs);*
* var activity = this.Context as Activity;*
* var previewScriptPage = eventArgs.NewElement as PreviewScriptPage;*
* previewScriptPage.Title = "Preview Script";*
* activity.SetContentView (Resource.Layout.PreviewScriptLayout);*

Now when on the PreviewScriptPage, if i press back button, the page is not
removed from the view. The title of the navigation bar on the top gets
changed to previous page in stack. So the navigation stack is popping but
the UI is not getting repainted.
Comment 2 Udham Singh 2015-02-19 05:39:59 UTC
Created attachment 9918 [details]
Zip Xamarin Logs

I have checked this issue with the help of sample project and test steps given in comment 1 and observed the reported behaviour. To test this issue I have used device Google Nexus 5 (android 5.0.1).

Adb Logcat : https://gist.github.com/Udham1/e3fd35f185af723feb48
Application Output : https://gist.github.com/Udham1/076f35a640a6607a23ae

Environment Info : 


Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

Xamarin (d6a2cae)
Comment 3 Kartik Bansal 2015-02-25 05:14:14 UTC
Since you already have my codebase, there are two more bug that i like to report

Both of these bugs are reproable in iOS 7 on ipad mini and iphone.
After you log in, log off from the app. The Master Details page do not pop out completely. The Left Navigation bar still remain in the view and then the app crashes. The code for log out is implement in CandidateDashboardPage (Line 27-33 is logout code). You will notice that on line 31-32, i push login selector page only for android because after i pop out the master details page, the OnApperaing in StartPage.cs next in the stack will execute in iOS and will push in login selector page.
When you are on the login selector page, select facebook will load pop up with facebook website in it. Cancel the login by hitting the cancel button on top left of the pop up. The pop up gets removed but no UI loads in the background
Both the above issues are only reproduce-able in iOS 7. The Xamarin Forms version i am using is
Comment 4 Jason Smith [MSFT] 2015-03-05 06:35:40 UTC
Please file a bug report for the other bugs.

Your issue on android is because your are replacing the entire contents of the Activity. You must instead set the contents of the renderer.

Documentation here: http://developer.xamarin.com/guides/cross-platform/xamarin-forms/custom-renderer/

The code pasted in the bug report is essentially displacing all of Forms.