Agent-skills-standard android-xml-views
Implement ViewBinding, RecyclerView, and XML Layouts on Android. Use when implementing XML layouts, ViewBinding, or RecyclerView adapters in Android. (triggers: layout/*.xml, **/*Binding.java, **/*Binding.kt, ViewBinding, ConstraintLayout, RecyclerView)
install
source · Clone the upstream repo
git clone https://github.com/HoangNguyen0403/agent-skills-standard
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/HoangNguyen0403/agent-skills-standard "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/android/android-xml-views" ~/.claude/skills/hoangnguyen0403-agent-skills-standard-android-xml-views && rm -rf "$T"
manifest:
skills/android/android-xml-views/SKILL.mdsource content
Android XML Views Standards
Priority: P1
Implementation Guidelines
ViewBinding
- Standard: Use ViewBinding for all XML layouts.
- Synthetics:
Dead. Remove it.kotlin-android-extensions - KAPT: Avoid DataBinding unless strictly necessary (impacts build speed).
RecyclerView
- Adapter: Always inherit
(wraps AsyncListDiffer).ListAdapter - Updates: Provide proper
. NEVER callDiffUtil.ItemCallback
.notifyDataSetChanged()
Layouts
- ConstraintLayout: Use for complex flat hierarchies.
- Performance: Avoid deep nesting (LinearLayout inside LinearLayout).
Anti-Patterns
- No findViewById: Deprecated. Use ViewBinding for all XML layouts.
- No kotlin-android-extensions: Deprecated. Remove all
.import kotlinx.android.synthetic.*