AGENT SKILL
android-xml-views
Standards for ViewBinding, RecyclerView, and XML Layouts. Use when implementing XML layouts, ViewBinding, or RecyclerView adapters in Android. (triggers: layout/*.xml, **/*Binding.java, **/*Binding.kt, ViewBinding, ConstraintLayout, RecyclerView)
- License 许可
- MIT
- 最近更新
- 2026-06-24
- Stars
- ★ 67
- Forks
- 24
01 前言 Front Matter
- name
- android-xml-views
- description
- Standards for ViewBinding, RecyclerView, and XML Layouts. Use when implementing XML layouts, ViewBinding, or RecyclerView adapters in Android. (triggers: layout/*.xml, **/*Binding.java, **/*Binding.kt, ViewBinding, ConstraintLayout, RecyclerView)
02 资源文件 6
- 脚本core/easing.py6.1 KB
- 脚本core/frame_composer.py4.4 KB
- 脚本core/gif_builder.py9.6 KB
- 脚本core/validators.py3.7 KB
- 许可证LICENSE.txt11.1 KB
- 参考文档requirements.txt66 B
03 SKILL.md 正文
Android XML Views Standards
Priority: P1
Implementation Guidelines
ViewBinding
- Standard: Use ViewBinding for all XML layouts.
- Synthetics:
kotlin-android-extensionsis 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 callnotifyDataSetChanged().
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.*.