Open Zachary-271 opened 4 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
I'm also experiencing the same issue on Android. The content of the 5th tab shows up when navigating to the 4th tab for the first time after app-reload, but for some reason, the 4th tab's page code-behind is triggered instead of the 5th tab's. I've checked the Navigation stack and binding context which all shows that the current page is the 4th tab's content, even though the 5th content is appearing instead. This issue does not occur on iOS or when there is 4 or less tabs on Android. Any advice?
I use the sample demo. could not reproduce your issue. Could you provide us with a sample project so we can investigate it further? Looking forward to your reply! TabbedPage.zip
Here is my project, I found that if the CollectionView only has a few items the bug doesn't show up. So on faster phones it might not be easy to reproduce, the bug is present on my Galaxy S9 when the app is in Release mode. TabBug.zip
@Zachary-271 I noticed the same thing in my case. The chance of reproducibility on my Samsung Galaxy S9 Android 10 is 100%. Whereas on Galaxy S21 Android 13 and Galaxy S22 Android 14, it’s roughly 30%.
This issue has been verified using Visual Studio 17.12.0 Preview 2.0(8.0.90 & 8.0.82 & 8.0.3). Can repro this issue at android platform with Android 12.
Hi @jfversluis @jamesmontemagno Can u please look into this problem? As most of the users are suffering with this issue, who is still using freshmvvm.maui & tabbedpage in their maui application. As this is very urgent, within very short of time we can't change the implementation from tabbedpage to shell tabs. So kindly fix this issue as soon as possible.
This is a very weird bug. I have been going through the TabbedPageManager and other files trying to find why specifically the 4th tab is impacted. Can't figure it out.
I have discovered something interesting though. I don't use xaml so I add my tabs in the constructor of my TabbedPage like follows
Children.Add(tab1);
Children.Add(tab2);
Children.Add(tab3);
Children.Add(tab4);
Children.Add(tab5);
if (Children.Count > 4)
{
SelectedItem = Children[3];
}
This sets my selected tab to tab4 instead of tab1. Now when I open my app that tab is displayed correctly and I don't notice any problems when navigating to the others.
Been trying to come up with a workaround that automatically swaps to tab 4 and then back. But I have wasted enough time already.
Description
When I first open the app, and then I click on the fourth tab, it shows that it's on the 4th tab, while showing the contents of the 5th tab. This only happened to me when I clicked on the 4th tab first, if I click on any other tab first the app behaves as expected. Then, if I continue to click on the other tabs, the correct tab contents are shown, and the app behaves as expected from that point on. If the tabs in my project only have 1 or 2 items in the collectionviews, the bug doesn't occur.
https://github.com/user-attachments/assets/dc25d81a-91d4-49a0-bc5d-5f1da9969f1b
Tabbar code:
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.70 SR7
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response