android-views-xml
Installation
SKILL.md
Android XML Layouts & Theming
Instructions
The XML view system remains the canonical Android UI toolkit for Java projects. Keep layouts flat, use ConstraintLayout for complex screens, and push repeated attributes into styles and themes.
1. ConstraintLayout First
Prefer a single ConstraintLayout root over nested LinearLayouts. Chains, barriers, guidelines, and groups replace most nesting.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">