New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android, Help Needed, Do Not Merge] TabbedPage child should not call disappearing on initial run #348
[Android, Help Needed, Do Not Merge] TabbedPage child should not call disappearing on initial run #348
Conversation
Hi @adrianknight89, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
Thanks for tying to resolve this bug. |
was this fixed with Xamarin forms v.2.3.2.127? |
this bug remains in XF 2.3.4.231 |
Hello, If you comment lines 37 to 51 in FragmentContainer.cs, the events appears all normal....
Can someone confirm that ? |
* Implemented Barometer across all platforms. * Added tests modeling compass sensor tests * Added more unit tests * Added samples * removed unused usings * Added barometer to all sensor page * Updated docs * Removed unused ios properties * Implemented maps as mentioned in branch name issue. also fixed a spelling mistake * Fixed typo which caused ui bug * Finished reset of fork * removed proj items * Android emulator has barometer * Code cleanup, lazy introduction, access modifiers * Modified barometer to be in sync with generic event handlers * copy paste * Updated barometer docs/en/Xamarin.Essentials/Barometer.xml * Finished updating barometer docs * Removed remnants from delegates * Changes requested in pr * iOS queue change * Sensor Speed * sensor reset
GH-348: Add Barometer Sensor API
Description of Change
Currently, there is a bug with Android TabbedPage that triggers appearing / disappearing events the wrong way. When you load a TabbedPage, the following happens:
Page1 should NOT call its
Disappearing
event. I was able to identify how this bug happens but not why.In
Page.cs
, after TabbedPage invokes itsAppearing
event insideIPageController.SendAppearing()
, it also invokes its current page'sAppearing
event like so:((IPageController)pageContainer?.CurrentPage)?.SendAppearing();
Then,
TabbedPageRenderer
invokespager.Measure(...)
insideOnLayout(...)
which in turn triggersIPageController.SendDisappearing()
inPage.cs
. I'm not sure why this is the case. This will fireDisappearing
event for the current page.The hack is to skip calling current page's appearing event as seen in the commit. This way,
IPageController.SendDisappearing()
will be called but not processed since_hasAppeared
is false.Can anyone comment why
pager.Measure(...)
setsUserVisibleHint
ofFragmentContainer
to false?Bugs Fixed