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
Copy the install prompt. Use the green button above this README.
Send it to your agent. Paste it into your coding agent’s chat and send.
Review the setup. Your agent checks the skill’s instructions, requirements, and installation scope.
Use this skill to test a `Fragment` in isolation using `FragmentScenario`, `launchFragmentInContainer<F>()`, and `launchFragment<F>()`. 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".
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.