Back to directory

Launching Fragments with Fragmentscenario

Agent skill
1 skill

Use this skill to test a Fragment in isolation using FragmentScenario, launchFragmentInContainer (), and launchFragment (). Covers the androidx.fragment:fragment-testing + androidx.fragment:fragment-testing-manifest artifact split, the EmptyFragmentActivity host (android:Theme.WithActionBar parent — not AppCompat), the themeResId override, the FragmentFactory survival across recreate() via the ViewModelStore-backed holder, the containerViewId = android.R.id.content vs 0 distinction (in-container vs headless), and the findNavController() limitation. Use when the user reports You need to use a Theme.AppCompat theme (or descendant), Fragment ... does not have a NavController set, Cannot set initial Lifecycle state to DESTROYED for FragmentScenario, or asks "how do I test a fragment in isolation" / "headless fragment test".

Install with
Claude CodeCodexCursorGitHub CopilotGemini CLI

Supported by the Atlas install prompt. Skill-specific requirements vary.

Skill stats

Skills1CategoryAdvertisingStars0

About this skill

Use this skill to test a Fragment in isolation using FragmentScenario, launchFragmentInContainer (), and launchFragment (). Covers the androidx.fragment:fragment-testing + androidx.fragment:fragment-testing-manifest artifact split, the EmptyFragmentActivity host (android:Theme.WithActionBar parent — not AppCompat), the themeResId override, the FragmentFactory survival across recreate() via the ViewModelStore-backed holder, the containerViewId = android.R.id.content vs 0 distinction (in-container vs headless), and the findNavController() limitation. Use when the user reports You need to use a Theme.AppCompat theme (or descendant), Fragment ... does not have a NavController set, Cannot set initial Lifecycle state to DESTROYED for FragmentScenario, or asks "how do I test a fragment in isolation" / "headless fragment test".

Quick start

  1. Copy the install prompt. Use the green button above this README.
  2. Send it to your agent. Paste it into your coding agent’s chat and send.
  3. Review the setup. Your agent checks the skill’s instructions, requirements, and installation scope.
Review, license & listing details
Review the source before using this skill

This is an imported listing. We haven’t certified its safety, license, or compatibility. Skills may include executable scripts.

Automated security scan: Partial

Only SKILL.md was scanned. Supporting files and scripts were not checked. No safety grade has been assigned.

0 potential findings · Scanned 11/4/2026 · Scanner 0.2.1

Content SHA-256: cedb206234e023dd9b4f8fd4f57b9b03d072e2b9641e38c215bb8484d8b32acb

About scan coverage and limitations

About this listing

Category
Advertising
Reported license
Apache-2.0
Listing language (estimated)
English
Review status
Not individually reviewed
Agent compatibility
Atlas installation supports Claude Code, Codex, and Cursor. Skill-specific dependencies and features are checked during setup.
Launching Fragments with Fragmentscenario | Agent Skills Atlas