android-android-xml-views

star 0

Standards for ViewBinding, RecyclerView, and XML Layouts

NguyenQuangTrung19 By NguyenQuangTrung19 schedule Updated 2/27/2026

name: Android - Android XML Views description: Standards for ViewBinding, RecyclerView, and XML Layouts

Android XML Views Standards

Priority: P1

Implementation Guidelines

ViewBinding

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

RecyclerView

  • Adapter: Always inherit ListAdapter (wraps AsyncListDiffer).
  • Updates: Provide a proper DiffUtil.ItemCallback. NEVER call notifyDataSetChanged().

Layouts

  • ConstraintLayout: Use for complex flat hierarchies.
  • Performance: Avoid deep nesting (LinearLayout inside LinearLayout).

Anti-Patterns

  • findViewById: **Deprecated**: Use ViewBinding.
  • Synthetics: **Deprecated**: Remove import kotlinx.android.synthetic.*.

References

Install via CLI
npx skills add https://github.com/NguyenQuangTrung19/Music-mobile-app --skill android-android-xml-views
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
NguyenQuangTrung19
NguyenQuangTrung19 Explore all skills →