[A] Check UserVisibleHint to prevent non-active tabs from firing SendAppearing in OnResume #328

Merged
merged 1 commit into from Aug 30, 2016

Conversation

Projects
None yet
5 participants
@pauldipietro
Member

pauldipietro commented Aug 29, 2016

Description of Change

The OnResume method in the FragmentContainer would falsely fire off SendAppearing for the non-visible tabs on a TabbedPage, causing the first switch to a tab to not fire the Appearing event as otherwise expected. Checking the UserVisibleHint value prevents this from occurring.

Bugs Fixed

https://bugzilla.xamarin.com/show_bug.cgi?id=43774

API Changes

None

Behavioral Changes

None involving this, specifically. Note that there is a separate issue, however; when using a test reproduction in the gallery project, the Appearing event is still firing twice when first opening the page (Appearing -> Disappearing -> Appearing, after the correction), with the first occurrence coming via Page.cs#L311. That issue would likely need to be revisited further, but this particular check should presumably help for this particular case with Appearing not activating on another tab the first time around.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
@rmarinho

This comment has been minimized.

Show comment
Hide comment
@rmarinho

rmarinho Aug 30, 2016

Member

👍

Member

rmarinho commented Aug 30, 2016

👍

@jassmith jassmith merged commit 88b15d7 into master Aug 30, 2016

stefandevo added a commit to stefandevo/Xamarin.Forms that referenced this pull request Aug 31, 2016

Merge branch 'master' of https://github.com/xamarin/Xamarin.Forms
* 'master' of https://github.com/xamarin/Xamarin.Forms: (69 commits)
  Fix docs
  [Win] Fix FontAttributes unexpectedly changing a label's size (#325)
  [A] Check UserVisibleHint to prevent non-active tabs from firing SendAppearing in OnResume (#328)
  KeyboardExtensions is now public (#326)
  [A] PanGestureRecognizer will consistently send Completed event (#313)
  Use character truncation in Windows (#321)
  Fix for ListView BindingContext for Header/Footer (#312)
  Fix memory leak caused by BaseCellView and RendererHolder (#311)
  Update Makefile to support linux env (#309)
  Platform Specifics (#301)
  Throw InvalidOperationException if AppLinkEntry.Thumbnail source is invalid (#299)
  Allow Custom Android MapRenderers to override the default MapView options (#285)
  Fix crash when ItemsSource is set to null (#320)
  Fixed SinInOut description. (#319)
  Fix regression by adding null check in Windows ListView selection (#314)
  [Android] Fix for NullReferenceException when using the wrong activit… (#286)
  [WinRT] Remove preemptive setting of null upon action sheet closure (#305)
  [Xaml] Clone node tree on DT, allow markup to be evaluated multiple times (#295)
  [Windows] Correct enter/esc keypress behaviors for MessageDialog (#292)
  [iOS] Change when we updated the XF INavigationPageController after popping a page natively, Cleanup UITest references (#291)
  ...

JoonghyunCho pushed a commit to JoonghyunCho/Xamarin.Forms that referenced this pull request Sep 1, 2016

@rmarinho rmarinho deleted the fix-bugzilla43774 branch Jun 22, 2017

@samhouts samhouts added this to the 2.3.3 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment