https://developer.android.com/agents/skills/jetpack-compose/migration/migrate-xml-views-to-jetpack-compose/skill

Convert Android XML Views into Jetpack Compose composables with visual parity validation.

5|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/fornewid/android-developers-changelog --skill https-developer-android-com-agents-skills-jetpack-compose-migration-migrate-xml-views-to-jetpack-compose-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: https://developer.android.com/agents/skills/jetpack-compose/migration/migrate-xml-views-to-jetpack-compose/skill
Source: https://github.com/fornewid/android-developers-changelog/tree/main/docs/agents/skills/jetpack-compose/migration/migrate-xml-views-to-jetpack-compose
Command: npx skills add https://github.com/fornewid/android-developers-changelog --skill https-developer-android-com-agents-skills-jetpack-compose-migration-migrate-xml-views-to-jetpack-compose-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Helps you convert a legacy Android XML View into Jetpack Compose while preserving the UI’s layout and styling so the migration stays visually consistent and functionally correct.

Core Features & Use Cases

  • 10-step safe migration workflow: from selecting the best XML candidate through validation and final XML removal.
  • Project-aware auditing: checks build readiness, Compose patterns, and theming infrastructure to align with existing conventions.
  • Visual parity verification: captures a baseline (screenshot/UI test) and iterates until the Compose result matches.

Quick Start

Use the skill to migrate your chosen XML layout file into a Jetpack Compose composable and replace its usages after validating visual parity.

Frequently Asked Questions about https://developer.android.com/agents/skills/jetpack-compose/migration/migrate-xml-views-to-jetpack-compose/skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate an Android XML layout to Jetpack Compose without breaking the UI?

To migrate XML layouts to Jetpack Compose without breaking the UI, apply a structured workflow mapping XML elements to composables, aligning theming infrastructure, and verifying visual parity using Compose Previews and screenshot tests before replacing legacy views.

What is the best way to verify visual parity when converting XML views to Compose?

The best way to verify visual parity during an XML to Compose migration is to capture a baseline screenshot of the original view and iterate on the composable until screenshot tests confirm a pixel-perfect visual match.

Can I migrate isolated leaf components from XML to Compose instead of whole screens?

Yes, you can migrate isolated leaf components from XML to Compose. The migration workflow supports both end-to-end screen conversions and individual UI components, ensuring theming alignment and safe usage replacement within the larger view hierarchy.

What do I need to check before starting an XML views to Jetpack Compose migration?

Before starting an XML to Jetpack Compose migration, you need to audit your project for build readiness, verify existing Compose patterns, and check your theming infrastructure to ensure the new composables align with current conventions.

How do you handle view interoperability when replacing XML with Compose?

Handling view interoperability when replacing XML with Compose involves a safe replacement step where usages are updated, followed by the eventual removal of the legacy XML files and their associated tests once visual and functional integrity is fully confirmed.