skills/developer.tuya.com/integrating-tuya-android-theme

integrating-tuya-android-theme

Installation
SKILL.md

概述 {#description}

涂鸦主题色体系由 thingOpenTheme Gradle 插件统一驱动,插件读取 lightTheme/blackTheme DSL,同时生成两套颜色资源:

  • BizBundle 桥接层thing_theme_color_*):BizBundle 内部页面渲染使用
  • 应用开放层thing_theme_open_color_*):应用自定义品牌色,通过 IThingThemeManager 在运行时获取

不配置插件的后果:BizBundle 内部颜色变为硬编码兜底值(黑白灰),应用页面无法与 BizBundle 页面保持视觉一致。

适用场景 {#scene}

已完成 integrating-tuya-android-sdk,计划接入任意 BizBundle 之前必须先完成本 skill 的配置。

步骤:

  1. 配置 Gradle 插件和依赖:根项目 build.gradle.ktsbuildscript 中加入插件 classpath;app/build.gradle.kts apply 插件并添加 thingsmart-theme-open 依赖。详见 references/theme-config.md

  2. 配置主题色 DSL:在 app/build.gradle.kts 中配置 thingOpenTheme 块,声明 lightThemeblackTheme 的颜色变量(推荐只修改 themeColor,其余使用默认值)。详见 references/theme-config.md

Installs
6
First Seen
May 21, 2026
integrating-tuya-android-theme from developer.tuya.com