{"id":"57f30192-babe-4701-ae17-5e81995f2d43","shortId":"jxfhqM","kind":"skill","title":"android-viewsystem-foundations","tagline":"Handle XML layouts, ConstraintLayout, Fragments, ViewBinding, DataBinding, and classic Android UI lifecycle patterns.","description":"# Android ViewSystem Foundations\n\n## When To Use\n- Use this skill when the request is about: xml layout android issue, fragment lifecycle android, constraintlayout cleanup.\n- Primary outcome: Handle XML layouts, ConstraintLayout, Fragments, ViewBinding, DataBinding, and classic Android UI lifecycle patterns.\n- Reach for this skill when the main surface is XML, Fragment, RecyclerView, or binding lifecycle work rather than Compose-first UI.\n- Handoff skills when the scope expands:\n- `android-compose-xml-interoperability`\n- `android-testing-ui`\n\n## Workflow\n1. Identify whether the target surface is Fragment, Activity, custom view, RecyclerView, or a mixed Compose/View interoperability screen.\n2. Anchor ownership correctly: view bindings to the view lifecycle, adapters to explicit item models, and navigation/transactions outside leaf views.\n3. Fix layout and rendering issues with classic View tools first: ConstraintLayout, RecyclerView diffing, window insets, and binding-safe updates.\n4. Exercise Fragment recreation, long text, font scaling, RTL, and process-lifecycle edges before considering the change complete.\n5. Hand off Compose interoperability or UI test depth only after the View-system ownership model is stable.\n\n## Guardrails\n- Optimize for stable state and predictable rendering before adding animation or abstraction.\n- Respect accessibility semantics, contrast, focus order, and touch target guidance by default.\n- Do not mix Compose and View system ownership without an explicit interoperability boundary.\n- Prefer measured performance work over premature micro-optimizations.\n- Clear ViewBinding references when the Fragment view is destroyed; do not keep view references alive past the view lifecycle.\n\n## Anti-Patterns\n- Embedding navigation or business logic directly in leaf UI components.\n- Using fixed dimensions that break on localization or dynamic text.\n- Ignoring semantics and announcing only visual changes.\n- Porting XML patterns directly into Compose without adapting the mental model.\n- Holding Fragment view state in stale bindings, view references, or adapters across view recreation.\n\n## Examples\n### Happy path\n- Scenario: Refine the XML OrbitTasks screen with ViewBinding and explicit fragment-safe patterns.\n- Command: `cd examples/orbittasks-xml && ./gradlew :app:testDebugUnitTest`\n\n### Edge case\n- Scenario: Handle configuration changes, view lifecycle, and long content in classic layouts.\n- Command: `cd examples/orbittasks-xml && ./gradlew :app:connectedDebugAndroidTest`\n\n### Failure recovery\n- Scenario: Prevent XML or Fragment requests from being routed to Compose-first skills.\n- Command: `python3 scripts/eval_triggers.py --skill android-viewsystem-foundations`\n\n## Done Checklist\n- The implementation path is explicit, minimal, and tied to the right Android surface.\n- Relevant example commands and benchmark prompts have been exercised or updated.\n- Handoffs to adjacent skills are documented when the request crosses boundaries.\n- Official references cover the chosen pattern and the main migration or troubleshooting path.\n\n## Official References\n- [https://developer.android.com/guide/fragments](https://developer.android.com/guide/fragments)\n- [https://developer.android.com/topic/libraries/view-binding](https://developer.android.com/topic/libraries/view-binding)\n- [https://developer.android.com/training/constraint-layout](https://developer.android.com/training/constraint-layout)\n- [https://developer.android.com/topic/libraries/data-binding](https://developer.android.com/topic/libraries/data-binding)","tags":["android","viewsystem","foundations","agent","skills","krutikjain","agent-skills","android-development","android-skills","androidx","claude-code","codex"],"capabilities":["skill","source-krutikjain","skill-android-viewsystem-foundations","topic-agent-skills","topic-android","topic-android-development","topic-android-skills","topic-androidx","topic-claude-code","topic-codex","topic-cursor","topic-jetpack-compose","topic-kotlin","topic-skills"],"categories":["android-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/krutikJain/android-agent-skills/android-viewsystem-foundations","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add krutikJain/android-agent-skills","source_repo":"https://github.com/krutikJain/android-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (3,573 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:29.376Z","embedding":null,"createdAt":"2026-05-18T13:20:52.498Z","updatedAt":"2026-05-18T19:13:29.376Z","lastSeenAt":"2026-05-18T19:13:29.376Z","tsv":"'/gradlew':332,352 '/guide/fragments](https://developer.android.com/guide/fragments)':433 '/topic/libraries/data-binding](https://developer.android.com/topic/libraries/data-binding)':442 '/topic/libraries/view-binding](https://developer.android.com/topic/libraries/view-binding)':436 '/training/constraint-layout](https://developer.android.com/training/constraint-layout)':439 '1':94 '2':112 '3':132 '4':153 '5':172 'abstract':203 'access':205 'across':309 'activ':102 'ad':200 'adapt':122,294,308 'adjac':407 'aliv':252 'anchor':113 'android':2,14,18,34,38,52,85,90,376,392 'android-compose-xml-interoper':84 'android-testing-ui':89 'android-viewsystem-found':1,375 'anim':201 'announc':283 'anti':258 'anti-pattern':257 'app':333,353 'benchmark':398 'bind':69,117,150,304 'binding-saf':149 'boundari':228,415 'break':274 'busi':263 'case':336 'cd':330,350 'chang':170,286,340 'checklist':380 'chosen':420 'classic':13,51,139,347 'cleanup':40 'clear':238 'command':329,349,371,396 'complet':171 'compon':269 'compos':75,86,175,219,292,368 'compose-first':74,367 'compose/view':109 'configur':339 'connecteddebugandroidtest':354 'consid':168 'constraintlayout':8,39,46,143 'content':345 'contrast':207 'correct':115 'cover':418 'cross':414 'custom':103 'databind':11,49 'default':215 'depth':180 'destroy':246 'developer.android.com':432,435,438,441 'developer.android.com/guide/fragments](https://developer.android.com/guide/fragments)':431 'developer.android.com/topic/libraries/data-binding](https://developer.android.com/topic/libraries/data-binding)':440 'developer.android.com/topic/libraries/view-binding](https://developer.android.com/topic/libraries/view-binding)':434 'developer.android.com/training/constraint-layout](https://developer.android.com/training/constraint-layout)':437 'dif':145 'dimens':272 'direct':265,290 'document':410 'done':379 'dynam':278 'edg':166,335 'embed':260 'exampl':312,395 'examples/orbittasks-xml':331,351 'exercis':154,402 'expand':83 'explicit':124,226,324,385 'failur':355 'first':76,142,369 'fix':133,271 'focus':208 'font':159 'foundat':4,20,378 'fragment':9,36,47,66,101,155,243,299,326,361 'fragment-saf':325 'guardrail':191 'guidanc':213 'hand':173 'handl':5,43,338 'handoff':78,405 'happi':313 'hold':298 'identifi':95 'ignor':280 'implement':382 'inset':147 'interoper':88,110,176,227 'issu':35,137 'item':125 'keep':249 'layout':7,33,45,134,348 'leaf':130,267 'lifecycl':16,37,54,70,121,165,256,342 'local':276 'logic':264 'long':157,344 'main':62,424 'measur':230 'mental':296 'micro':236 'micro-optim':235 'migrat':425 'minim':386 'mix':108,218 'model':126,188,297 'navig':261 'navigation/transactions':128 'offici':416,429 'optim':192,237 'orbittask':319 'order':209 'outcom':42 'outsid':129 'ownership':114,187,223 'past':253 'path':314,383,428 'pattern':17,55,259,289,328,421 'perform':231 'port':287 'predict':197 'prefer':229 'prematur':234 'prevent':358 'primari':41 'process':164 'process-lifecycl':163 'prompt':399 'python3':372 'rather':72 'reach':56 'recoveri':356 'recreat':156,311 'recyclerview':67,105,144 'refer':240,251,306,417,430 'refin':316 'relev':394 'render':136,198 'request':29,362,413 'respect':204 'right':391 'rout':365 'rtl':161 'safe':151,327 'scale':160 'scenario':315,337,357 'scope':82 'screen':111,320 'scripts/eval_triggers.py':373 'semant':206,281 'skill':26,59,79,370,374,408 'skill-android-viewsystem-foundations' 'source-krutikjain' 'stabl':190,194 'stale':303 'state':195,301 'surfac':63,99,393 'system':186,222 'target':98,212 'test':91,179 'testdebugunittest':334 'text':158,279 'tie':388 'tool':141 'topic-agent-skills' 'topic-android' 'topic-android-development' 'topic-android-skills' 'topic-androidx' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-jetpack-compose' 'topic-kotlin' 'topic-skills' 'touch':211 'troubleshoot':427 'ui':15,53,77,92,178,268 'updat':152,404 'use':23,24,270 'view':104,116,120,131,140,185,221,244,250,255,300,305,310,341 'view-system':184 'viewbind':10,48,239,322 'viewsystem':3,19,377 'visual':285 'whether':96 'window':146 'without':224,293 'work':71,232 'workflow':93 'xml':6,32,44,65,87,288,318,359","prices":[{"id":"68eed361-dee5-43e3-b855-8eb5f89fbebc","listingId":"57f30192-babe-4701-ae17-5e81995f2d43","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"krutikJain","category":"android-agent-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:52.498Z"}],"sources":[{"listingId":"57f30192-babe-4701-ae17-5e81995f2d43","source":"github","sourceId":"krutikJain/android-agent-skills/android-viewsystem-foundations","sourceUrl":"https://github.com/krutikJain/android-agent-skills/tree/main/skills/android-viewsystem-foundations","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:52.498Z","lastSeenAt":"2026-05-18T19:13:29.376Z"}],"details":{"listingId":"57f30192-babe-4701-ae17-5e81995f2d43","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"krutikJain","slug":"android-viewsystem-foundations","github":{"repo":"krutikJain/android-agent-skills","stars":8,"topics":["agent-skills","android","android-development","android-skills","androidx","claude-code","codex","cursor","jetpack-compose","kotlin","skills"],"license":"mit","html_url":"https://github.com/krutikJain/android-agent-skills","pushed_at":"2026-03-25T05:47:20Z","description":"Android skills repository for Kotlin, Compose, XML, testing, CI, release work, and legacy upgrades","skill_md_sha":"a7f041158ea0bd83b0a018589bd2c24c50b6c9b1","skill_md_path":"skills/android-viewsystem-foundations/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/krutikJain/android-agent-skills/tree/main/skills/android-viewsystem-foundations"},"layout":"multi","source":"github","category":"android-agent-skills","frontmatter":{"name":"android-viewsystem-foundations","description":"Handle XML layouts, ConstraintLayout, Fragments, ViewBinding, DataBinding, and classic Android UI lifecycle patterns."},"skills_sh_url":"https://skills.sh/krutikJain/android-agent-skills/android-viewsystem-foundations"},"updatedAt":"2026-05-18T19:13:29.376Z"}}