1---2name: android-ui-states-validation3description: Review Android UI flows for empty, loading, error, offline, and edge-case behavior before release.4---5# Android UI States Validation67## When To Use8- Use this skill when the request is about: validate android ui states, check loading empty error flow android, edge cases in android screen.9- Primary outcome: Review Android UI flows for empty, loading, error, offline, and edge-case behavior before release.10- Reach for this skill when the core question is state coverage and recovery UX, not which test framework or assertion library to use.11- This skill decides what the user should see in each branch of the state matrix. `android-testing-ui` only validates that design with assertions and screenshots.12- Handoff skills when the scope expands:13- `android-compose-accessibility`14- `android-testing-ui`1516## Workflow171. Confirm the user-visible journey, target device behavior, and failure states that matter.182. Build a state matrix that covers loading, content, empty, error, offline, stale-data, denied-permission, and post-action confirmation states as applicable.193. Identify the owning screens, activities, destinations, and state holders for each branch of that matrix.204. Validate recovery UX, accessibility, configuration changes, and back-stack behavior in the showcase apps.215. Hand off to testing only when the missing work is about assertions or automation rather than state design.2223## Guardrails24- Treat loading, empty, error, offline, and permission-denied states as first-class UI states.25- Do not hide navigation or permission side effects inside reusable UI components.26- Prefer lifecycle-aware APIs over manual callback chains.27- Keep deep links, intents, and permission prompts testable and observable.28- Distinguish transient messages, persistent error states, and stale-but-usable content instead of collapsing them into one generic failure screen.2930## Anti-Patterns31- Assuming the happy path is enough for product flows.32- Hard-coding request codes or route strings in multiple places.33- Triggering navigation directly from repositories or network layers.34- Shipping flows without recovery UI for denied permissions or broken state.35- Using tests as a substitute for deciding what the product should show in each failure mode.3637## Examples38### Happy path39- Scenario: Validate OrbitTasks loading, content, and success confirmation states.40- Command: `cd examples/orbittasks-compose && ./gradlew :app:connectedDebugAndroidTest`4142### Edge case43- Scenario: Exercise long content, empty lists, and sync failures in the XML fixture.44- Command: `cd examples/orbittasks-xml && ./gradlew :app:connectedDebugAndroidTest`4546### Failure recovery47- Scenario: Avoid misrouting UI validation work to accessibility or testing-only skills.48- Command: `python3 scripts/eval_triggers.py --skill android-ui-states-validation`4950## Done Checklist51- The implementation path is explicit, minimal, and tied to the right Android surface.52- Relevant example commands and benchmark prompts have been exercised or updated.53- Handoffs to adjacent skills are documented when the request crosses boundaries.54- Official references cover the chosen pattern and the main migration or troubleshooting path.5556## Official References57- [https://developer.android.com/topic/architecture/ui-layer](https://developer.android.com/topic/architecture/ui-layer)58- [https://developer.android.com/guide/topics/resources/runtime-changes](https://developer.android.com/guide/topics/resources/runtime-changes)59- [https://developer.android.com/guide/practices/ui_guidelines](https://developer.android.com/guide/practices/ui_guidelines)60- [https://developer.android.com/guide/topics/ui/accessibility/apps](https://developer.android.com/guide/topics/ui/accessibility/apps)