Skip to content

fix(android): Corrected TabView fragment manager resolution#11228

Open
CatchABus wants to merge 4 commits into
NativeScript:mainfrom
CatchABus:fix/android-tabview-fragmentmanager
Open

fix(android): Corrected TabView fragment manager resolution#11228
CatchABus wants to merge 4 commits into
NativeScript:mainfrom
CatchABus:fix/android-tabview-fragmentmanager

Conversation

@CatchABus
Copy link
Copy Markdown
Contributor

@CatchABus CatchABus commented May 24, 2026

PR Checklist

What is the current behavior?

This is the second attempt after #11217.
Apparently, entering tab item loaded lifecycle during adapter attach is too early and tab frame fragments don't get enough time to be added to the correct fragment manager.

What is the new behavior?

This PR takes a few things from ui-material tabs plugin:

  • Uses the fragment onCreateView/onDestroyView fragment lifecycles to ensure view loaded lifecycle is called at the right time (see line, commit)
  • Safety checks for opening/closing modals that contain a tab view

It seems we don't really need the material plugin approach for retrieving child fragment manager since adapter always adds/attaches fragments to tabView._getFragmentManager(), so this PR uses the fragment tag to resolve the tab fragment directly and consequently the child fragment manager here.

Fixes #10165.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 24, 2026

View your CI Pipeline Execution ↗ for commit 0936186

Command Status Duration Result
nx test apps-automated -c=ios ✅ Succeeded 2m 25s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-24 22:00:41 UTC

@CatchABus CatchABus marked this pull request as ready for review May 24, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android][NS 8.3] Incorrect TabView behaviour

1 participant