android-layouts

Community

Build fast, maintainable Android XML and Compose layouts.

Authorkvithayathil
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill eliminates the common pain points of slow, inefficient Android layouts—both legacy XML/View systems and modern Jetpack Compose—that suffer from deep view hierarchies, double measurement overhead, incorrect modifier ordering, poor View-Compose interop, and improper inset handling, leading to janky UI and poor user experience.

Core Features & Use Cases

  • XML Layout Optimization: Guidance on flattening hierarchies, using ConstraintLayout, merge/include, ViewStub, avoiding double taxation in weighted LinearLayouts, and implementing RecyclerView and CoordinatorLayout patterns.
  • Compose Layout Best Practices: Covers layout phases, modifier order, WindowInsets handling, lazy layout content padding, custom layouts, SubcomposeLayout use cases, and adaptive layouts with WindowSizeClass for foldables and varying screen sizes.
  • View-Compose Interop: Patterns for incremental migration including embedding Compose in XML via ComposeView, embedding XML views in Compose via AndroidView and AndroidViewBinding, and common interop pitfalls to avoid.
  • Use Case: For example, if you are optimizing a news app's home screen that is experiencing layout jank on low-end devices, use this Skill to flatten the XML hierarchy, replace nested weighted LinearLayouts with ConstraintLayout, and verify no double taxation is occurring. For a new Compose feature screen, use it to ensure correct modifier order, proper WindowInsets handling, and efficient LazyColumn implementation.

Quick Start

Use the android-layouts skill to review your existing Android app's layout files for performance bottlenecks and implement recommended optimizations for both XML and Compose screens.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: android-layouts
Download link: https://github.com/kvithayathil/agent-resources/archive/main.zip#android-layouts

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 536,000+ vetted skills library on demand.