Skip to content

[Android] Fixed incorrect tab content display in TabbedPage#27294

Merged
jfversluis merged 7 commits intodotnet:inflight/currentfrom
Vignesh-SF3580:fix-23732
Sep 2, 2025
Merged

[Android] Fixed incorrect tab content display in TabbedPage#27294
jfversluis merged 7 commits intodotnet:inflight/currentfrom
Vignesh-SF3580:fix-23732

Conversation

@Vignesh-SF3580
Copy link
Copy Markdown
Contributor

@Vignesh-SF3580 Vignesh-SF3580 commented Jan 23, 2025

Issue Detail

When opening the app and clicking directly on the fourth tab, the fifth tab's content is displayed instead of the correct content.

Root Cause:

The OffscreenPageLimit mapping was missing in the source, leading to incorrect preloading of tab contents.

Description of Change

Mapped the OffscreenPageLimit property to ensure proper preloading of tab contents, resolving the issue.

Tested the behavior in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #23732
Fixes #21640
Fixes #28933

Screenshots

Before Issue Fix After Issue Fix
TabBarBefore.mov
TabBarAfter.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 23, 2025
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 23, 2025
@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@Vignesh-SF3580 Vignesh-SF3580 marked this pull request as ready for review January 23, 2025 15:07
Copilot AI review requested due to automatic review settings January 23, 2025 15:07
@Vignesh-SF3580 Vignesh-SF3580 requested a review from a team as a code owner January 23, 2025 15:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/Controls/tests/TestCases.HostApp/Issues/23732Page.xaml: Language not supported
Comments suppressed due to low confidence (1)

src/Controls/tests/TestCases.HostApp/Issues/23732Page.xaml.cs:5

  • [nitpick] The class name '_23732Page' is unconventional. It should be renamed to 'Page23732'.
public partial class _23732Page : ContentPage

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

jsuarezruiz
jsuarezruiz previously approved these changes Jan 24, 2025
Copy link
Copy Markdown
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the failing test is actually valid in this case, please look into that @Vignesh-SF3580

@Vignesh-SF3580
Copy link
Copy Markdown
Contributor Author

I think the failing test is actually valid in this case, please look into that @Vignesh-SF3580

@jfversluis I have validated the test case failure and corrected it by removing the DisconnectHandler call, as the latest code automatically calls previous page's DisconnectHandler during navigation.

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the attached videos, I see the below had no animations but the after does have.

Is this a result of your fix or was the capture not correct?

var nextPage = tabbedPage.Children[pageIndex];
tabbedPage.CurrentPage = nextPage;
await OnNavigatedToAsync(nextPage);
previousPage.Handler.DisconnectHandler();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed, is something leaking?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattleibow As mentioned earlier, this test fails with a timeout exception when using DisconnectHandler with the fix. Since the latest code automatically calls the previous page's DisconnectHandler during navigation, I have removed this code.

@Vignesh-SF3580
Copy link
Copy Markdown
Contributor Author

In the attached videos, I see the below had no animations but the after does have.

Is this a result of your fix or was the capture not correct?

@mattleibow The issue occurs when navigating directly from the first to the fourth tab, where the content does not update properly, and animations are missing.

However, animations work when switching between other tabs. My fix ensures the tab content updates correctly, and animations now work as expected when switching from the first to the fourth tab also.

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still tests consistently failing here

@Vignesh-SF3580
Copy link
Copy Markdown
Contributor Author

Still tests consistently failing here

@jfversluis I have checked the test case failures in this PR, and the only failing test is "GridCellsHonorMaxWidth", that failure is not related to the fix I have added. All other tests have passed without any issues. Most probably re triggering the CI will clear the test case failures. Could you please check and let me know if you have any concerns?

@jsuarezruiz
Copy link
Copy Markdown
Contributor

Still tests consistently failing here

@jfversluis I have checked the test case failures in this PR, and the only failing test is "GridCellsHonorMaxWidth", that failure is not related to the fix I have added. All other tests have passed without any issues. Most probably re triggering the CI will clear the test case failures. Could you please check and let me know if you have any concerns?

Rebased to avoid the GridCellsHonorMaxWidth failure.

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/rebase

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/rebase

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/rebase

@remi-appsolu
Copy link
Copy Markdown

I have a workaround : #26014 (comment)

@jsuarezruiz
Copy link
Copy Markdown
Contributor

jsuarezruiz commented May 12, 2025

/azp run MAUI-UITests-public

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis
Copy link
Copy Markdown
Member

/rebase

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis
Copy link
Copy Markdown
Member

jfversluis commented Aug 21, 2025

/azp run MAUI-public

@dotnet dotnet deleted a comment from azure-pipelines bot Aug 21, 2025
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis jfversluis changed the base branch from main to inflight/current September 2, 2025 07:32
@jfversluis jfversluis merged commit bc7c5e7 into dotnet:inflight/current Sep 2, 2025
92 of 94 checks passed
@jfversluis jfversluis added this to the .NET 9 SR11 milestone Sep 2, 2025
PureWeen pushed a commit that referenced this pull request Sep 8, 2025
issue fixed and testcases updated.

updated Issue23732.cs

updated testcases.

updated the testcase by removing the DisconnectHandler.

updated testcases.

21640 testcases added.
@jfversluis jfversluis modified the milestones: .NET 9 SR11, .NET 9 SR12 Sep 11, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-tabbedpage TabbedPage community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TabbedPage] PopToRootAsync displaying wrong page Android Tabbar, clicking 4th tab opens the 5th tab TabbedPage: content not shown after readding

7 participants