-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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] Content wrapped in NavigationPage objects in Tabbed Page disappears after tabs navigating #9743
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
I have a temporary workaround for this, where you can increase the OffscreenPageLimit. The Xamarin.Forms property works, it looks like it's not hooked up properly in MAUI. This obviously is a tradeoff, and ideally the reload when it goes out of scope would also work. private void ModifyTabbedPageHandler()
{
Microsoft.Maui.Handlers.TabbedViewHandler.Mapper.AppendToMapping("FixMultiTab", (handler, view) =>
{
#if ANDROID
var viewPager = (AndroidX.ViewPager2.Widget.ViewPager2)handler.PlatformView;
viewPager.OffscreenPageLimit = 5;
#endif
});
} This issue from Xamarin is similar, except that it's doing what I'd expect (where the page is reloaded if it goes out of scope), whereas in MAUI at the moment it just stays blank. |
#10108 Android: UI elements disappear when showing page, the 2nd time The issue is categorized as duplicate of this one. Maybe this is resolved as well. |
Hi @neordi. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
I'm still having this issue, even with the latest version of maui, net7, VS. |
Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you! |
Could you please re-open this issue or mark it as duplicate of #7558, and then fix it ? |
The bot closed this bug prematurely, #11530 should be resolved first. |
@drasticactions |
@tranb3r Can you try this work around and see how it goes? Copy the files from here to your project https://github.com/PureWeen/ShanedlerSamples/tree/main/ShanedlerSamples/Library Then in your builder you can call builder
.UseMauiApp<App>()
.ConfigureTabbedPageWorkarounds() |
@PureWeen However, sometimes, the navigation (push page) does not work. I'm prettry sure it's linked to your fix. |
@PureWeen How can I help? |
I might have missed it but can you point me to your repro project with this workaround applied? |
https://github.com/tranb3r/Issues/tree/main/MauiAppTabbedPageBlank |
I updated my samples. |
Looks good to me. Thank you!! |
@PureWeen
Is this something that can be fixed in your code? |
Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you! |
Hmmmmm let me think on that. I'll push something up over on my repository :-/ |
@tranb3r I pushed some changes over here it's a bit weird :-) so we'll see if you hit another issue just log it on that Repository. |
@PureWeen Can this fix be backported to .Net 7? |
The bug is still here in maui SR 7.0.81. |
Description
While navigating between 4 or more tabs that are wrapped in a 'NavigationPage' objects in 'TabbedPage', some tabs disappear. Instead of them blank Navigation Page is displayed and no errors are provided. OnAppearing() method is invoked but no contents are displayed.
On IOS 'TabbedPage' with 'NavigationPage' objects as children behaves as expected.
Reproduction project is here.
Steps to Reproduce
Content of 1st tab has disappeared.
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 11 and up
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: