android-xml-to-compose-migration

Migrate Android XML layouts and View-based screens to Jetpack Compose.

1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/Binh230199/ai --skill android-xml-to-compose-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-xml-to-compose-migration
Source: https://github.com/Binh230199/ai/tree/main/.github/skills/android-xml-to-compose-migration
Command: npx skills add https://github.com/Binh230199/ai --skill android-xml-to-compose-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you modernize legacy Android user interfaces by translating XML layouts and View-based screens into idiomatic Jetpack Compose while preserving behavior during migration.

Core Features & Use Cases

  • Layout Migration: Map common XML structures such as LinearLayout, ConstraintLayout, RecyclerView, and ViewPager2 to Compose equivalents like Column, ConstraintLayout, LazyColumn, and HorizontalPager.
  • Widget and Theme Migration: Replace Views such as TextView, ImageView, EditText, Button, and Toolbar with Compose components and Material 3 theming tokens.
  • Interop and Incremental Rollout: Use ComposeView and AndroidView to migrate one screen at a time, review completed screens, and safely phase out XML without rewriting the whole app at once.
  • Use Case: If you have an AAOS media screen built with fragments, XML layouts, and adapters, this Skill guides you through converting it to Compose while keeping lifecycle handling, state flow, and navigation behavior intact.

Quick Start

Ask for a migration plan or rewrite for a specific XML screen, and provide the layout or screen name you want converted to Jetpack Compose.

Frequently Asked Questions about android-xml-to-compose-migration

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

FAQPage Schema
How do I migrate legacy Android XML layouts to Jetpack Compose?

You can migrate XML screens to Compose incrementally using ComposeView and AndroidView for interop, allowing you to convert one screen at a time. This approach safely phases out XML layouts without rewriting the entire application at once, preserving lifecycle handling and navigation behavior.

Does XML to Compose migration support ConstraintLayout and ViewPager2?

Jetpack Compose migration replaces legacy Views like TextView, ImageView, EditText, Button, and Toolbar with native Compose components. It applies Material 3 theming tokens to ensure the new UI matches modern Android design standards while retaining original screen behavior.

Can I migrate AAOS fragment and adapter screens to Compose?

Yes, you can migrate AAOS media screens built with fragments, XML layouts, and adapters to Compose. The migration process converts these legacy screens while keeping state flow, lifecycle handling, and navigation behavior intact throughout the transition.

What is the best way to handle interop when migrating Android XML to Compose?

The best way to handle interop during Android XML to Compose migration is using ComposeView and AndroidView. This allows incremental rollout by migrating one screen at a time, reviewing completed screens, and safely phasing out XML without a full application rewrite.

Do I need to rewrite my entire app to start using Jetpack Compose?

No, you do not need to rewrite your entire app to start using Jetpack Compose. By leveraging ComposeView and AndroidView interop, you can migrate individual XML screens incrementally, review them, and safely phase out legacy layouts while maintaining existing lifecycle and state management.