android-xml-views

star 508

Implement ViewBinding, RecyclerView, and XML layouts correctly on Android. Use when working with XML layouts, ViewBinding, or RecyclerView adapters in legacy Android projects.

HoangNguyen0403 By HoangNguyen0403 schedule Updated 5/20/2026

name: android-xml-views description: Implement ViewBinding, RecyclerView, and XML layouts correctly on Android. Use when working with XML layouts, ViewBinding, or RecyclerView adapters in legacy Android projects. metadata: triggers: files: - 'layout/*.xml' - '**/*Binding.java' - '**/*Binding.kt' keywords: - ViewBinding - ConstraintLayout - RecyclerView


Android XML Views Standards

Priority: P1

Implementation Guidelines

ViewBinding

  • Standard: Use ViewBinding for all XML layouts.
  • Synthetics: kotlin-android-extensions Dead. Remove it.
  • KAPT: Avoid DataBinding unless strictly necessary (impacts build speed).

RecyclerView

  • Adapter: Always inherit ListAdapter (wraps AsyncListDiffer).
  • Updates: Provide proper DiffUtil.ItemCallback. NEVER call 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.*.

References

Install via CLI
npx skills add https://github.com/HoangNguyen0403/agent-skills-standard --skill android-xml-views
Repository Details
star Stars 508
call_split Forks 147
navigation Branch main
article Path SKILL.md
More from Creator
HoangNguyen0403
HoangNguyen0403 Explore all skills →