为布局 XML 中的控件默认补全 DevSimple(lib/DevSimple)的 ViewTheme 样式引用: 按控件继承链匹配 ViewTheme.<类名>,ImageView/AppCompatImageView 使用 ViewTheme.ImageView.FIT_XY,无匹配则用 ViewTheme.View。工作区内优先 Read lib/DevSimple;根样式清单见同目录 references/reference.md。在编写或批量整理 layout XML、 引入 ViewTheme、迁移旧布局、或用户提到 DevSimple/ViewTheme 时使用。
80
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
| 符号 | 当前值 |
|---|---|
DEVSIMPLE_ROOT | lib/DevSimple |
DEVSIMPLE_VALUES | {DEVSIMPLE_ROOT}/src/main/res/values |
存在 {DEVSIMPLE_ROOT} 时 Read 本地 XML,勿用 WebFetch 代替。根样式全表、继承链、资源文件索引与 grep 维护步骤 → references/reference.md。
res/layout/**/*.xml 中的控件,需要统一默认宽高与主题习惯时。ViewTheme 的 style 时。@style/ViewTheme.*。{DEVSIMPLE_VALUES} grep name="ViewTheme. 后更新 reference(见 reference §扫描与更新)。style/android:theme:不要覆盖用户显式配置;除非用户明确要求替换。RecyclerView)。AppCompatEditText → EditText;MaterialButton → Button。ImageView / AppCompatImageView 一律style="@style/ViewTheme.ImageView.FIT_XY"(不用 ViewTheme.ImageView 作默认)。ViewTheme.<语义类名>,则style="@style/ViewTheme.<语义类名>"(ImageView 已按上一步处理)。ViewTheme.ViewPager2;使用 style="@style/ViewTheme.ViewPager"。style="@style/ViewTheme.View"。style 放在标签属性前列(与项目现有 XML 风格一致)。继承链与常见标签对照 → references/reference.md §继承链速查。需要 Match / Gravity / 子样式时 → references/reference.md §子样式命名规律。
<androidx.core.widget.NestedScrollView
style="@style/ViewTheme.NestedScrollView">
<androidx.recyclerview.widget.RecyclerView
style="@style/ViewTheme.RecyclerView" />
<androidx.appcompat.widget.AppCompatImageView
style="@style/ViewTheme.ImageView.FIT_XY"
android:layout_width="match_parent"
android:layout_height="120dp" />
<androidx.appcompat.widget.AppCompatEditText
style="@style/ViewTheme.EditText" />
</androidx.core.widget.NestedScrollView>无库内主题的控件:
<androidx.appcompat.widget.SwitchCompat
style="@style/ViewTheme.View"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />{DEVSIMPLE_VALUES} 核对)。style(除非明确要求)。ViewTheme 时,按 reference §扫描与更新 同步 reference,勿只改 SKILL。3fa9400
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.