Bug 46339 - OnVisibilityChanged not properly firing on Android 4.4
Summary: OnVisibilityChanged not properly firing on Android 4.4
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.3
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-11-02 19:50 UTC by Jimmy [MSFT]
Modified: 2017-03-01 16:23 UTC (History)
2 users (show)

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


Attachments
repro project (53.33 KB, application/zip)
2016-11-02 19:50 UTC, Jimmy [MSFT]
Details


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 for Bug 46339 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Jimmy [MSFT] 2016-11-02 19:50:28 UTC
Created attachment 18309 [details]
repro project

### Overview
Inside a custom page renderer, OnVisibilityChanged is not being called for a page that is subsequently navigated to. The event is fired properly for the previous view when navigating away from/back to it, it's just the new view that has this issue.

This appears to only be happening on Android 4.4 and below. I could not reproduce it on 5.0/6.0.


### Steps to Reproduce
1. Run the attached Android project on Android 4.4 or lower
2. Press the "Next" button


### Expected Results
The debug output will show:
> ***** TestBasePage Visibility: Gone ******* (for the disappearing page)
> ***** TestBasePage Visibility: Visible ******* (for the appearing page)


### Actual Results
The output only shows:
> ***** TestBasePage Visibility: Gone ******* 

However if you navigate away from the new page then OnVisibilityChanged will be called as expected.


### Testing Info
Tested using Forms 2.3.2 and 2.3.3-pre3