-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Android/Forms Tabpage OnDisappearing firing minimized #1438
Comments
how i can fix this behavior? |
Hi Guys, It is crazy, i posted a solution since last may 2017 on the PR 354. It is seems nobody want really solve this problem. If you comment lines 37 to 51 in FragmentContainer.cs, the events appears all normal....
In facts, if you comment thoses lines (UserVisibleHint), methods below, do their jobs.
Can someone confirm that ? |
Just to confirm that the bug is indeed hitting me too with latest XF 2.5.0.121934 |
This is happening for me too. |
@JayShockwave @nbsoftware what0s the issue you are seeing? the only thing i see is that TabPage1 Appearing doesn't fire the 1st time with the latest 2.5.0 |
After some digging, I found that my issue was actually something else, unrelated to this one. |
@rmarinho I spend a good part of this morning trying to reproduce the behavior in a simpler form to illustrate but I am unable to do so. Must be a bug in my code. Disregard my comment, thanks. |
I can repro the case. And I have a very basic and simple sample. Main Page launching TabbedPage with 2 pages Page1 and Page2 Page1::OnAppearing is called twice. Launch application. Click button. Debug output shows:
|
* 'master' of https://github.com/xamarin/Xamarin.Forms: (23 commits) [C] use direct cast [Core, iOS, Android, UWP, WPF] Hide scroll view scroll bars (xamarin#1910) Allow users to specify resolution method for handlers, effects, and services (xamarin#1870) fixes xamarin#1739 [Build] Update submodule Capitalization keyboard flag additions for Entry/Editor (xamarin#1683) (xamarin#1833) [Build] Don't specify .net sdk version Simplify event raising invocation pattern (xamarin#1971) [iOS Maps] Pin rendering customization (xamarin#1065) set csharp_space_after_keywords_in_control_flow_statements to true to fit our design guide lines (xamarin#1964) [iOS] Add shadow effect (xamarin#1896) Added support for ListView full width separators on iOS (xamarin#1854) fixes xamarin#1665 Support CascadeInputTransparent to Tizen (xamarin#1916) [Android]?Remove UserVisibleHint (xamarin#1550) fixes xamarin#1438 [iOS] ViewDidLayoutSubviews after removing page (xamarin#1532) fixes xamarin#1426 Use relative URL to support recursive checkout in VSTS (xamarin#1926) [UITest] Fix test for UITest package update (xamarin#1923) Implemented MaxLength property on Entry and Editor (xamarin#1880) [Build]Fix master and build (xamarin#1920) [Build] Fix windows cert Fix to absolute URL ... # Conflicts: # Xamarin.Forms.Controls/CoreGalleryPages/EditorCoreGalleryPage.cs # Xamarin.Forms.Controls/CoreGalleryPages/EntryCoreGalleryPage.cs # Xamarin.Forms.Core/InputView.cs # Xamarin.Forms.CustomAttributes/TestAttributes.cs # Xamarin.Forms.Platform.Android/Renderers/EditorRenderer.cs # Xamarin.Forms.Platform.Android/Renderers/EntryRenderer.cs # Xamarin.Forms.Platform.MacOS/Renderers/EditorRenderer.cs # Xamarin.Forms.Platform.MacOS/Renderers/EntryRenderer.cs # Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs # Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs # Xamarin.Forms.Platform.WPF/Renderers/EditorRenderer.cs # Xamarin.Forms.Platform.WPF/Renderers/EntryRenderer.cs # Xamarin.Forms.Platform.iOS/Renderers/EditorRenderer.cs # Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs
The issue is still present on latest stable version of Xamarin.Forms. Do you know if the version 2.5.1 is going to contain this fix? btw, the issue is not only for the event onDisappearing but also the event onAppearing. |
I just installed forms 2.5.1 into my project and the OnAppearing is still being called twice. Pretty sure there needs also to be a new issue "Android/Forms Tabpage OnAppearing firing minimized". |
Hello, May I ask why this one seems to be closed? As far as I can see, I still have the issue with in latest XF 3.0.0.561731. Is it because it is linked to #2240 which happens to be still opened (although it think it is not the exact same issue)? This is very frustrating because I have a XF Map on the first tab and it refreshes in a very very ugly way when switching from another tab to this one - only in Android of course. |
Hi @nbsoftware, please open a new issue with a sample project demonstrating the problem if you're issue doesn't appear to be solve in the latest 3.0.0. |
Hi @davidortinau , |
Hi everyone, Solution: It was less than 10 lines of code which I had to change to make it work. |
Migrated from https://bugzilla.xamarin.com/show_bug.cgi?id=44211
Description
Steps to Reproduce
Run Sample for Tabs Android Forms.
Click Push Page2.
Click Push Tab
Tab Message:
Tab2Page2 Appear (OK)
TabPage1 Appear (OK)
TabPage1 Disappear (WHY? wrong)
TabPage1 Appear (WHY 2 times?)
Tabpage2 Disappear (WHY?)
Expected Behavior
What I think should happen.
TabPage1 Appear
TabPage2 Appear
Proposed solution: #354
Basic Information
Reproduction Link
FormsAppearDisappear.zip
The text was updated successfully, but these errors were encountered: