一键导入
ui-leanback
Trigger: TV UI & Media Clients. Implementing Leanback-compliant interfaces, handling D-pad focus, View Binding, and Glide image loading.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Trigger: TV UI & Media Clients. Implementing Leanback-compliant interfaces, handling D-pad focus, View Binding, and Glide image loading.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Test-driven development with red-green-refactor loop. MUST be triggered during ANY coding session involving feature implementation or bug fixes or specifications.
Evaluates skills based on discoverability, agent-friendliness, and consumption efficiency. Returns a Letter Grade (A+ to F) and actionable coaching.
Validating agent skills against the agentskills.io specification and generating compliance reports.
Trigger: Data Flow & Modules. Implementing Repositories, managing cross-module boundaries, and handling async work with Coroutines.
Trigger: Pre-Commit/Final Review. Validating code against Serenity’s 'Golden Standards' for architecture, security, performance, and testing before merging.
Trigger: Presenter Logic. Managing Moxy MVP state, Presenter lifecycle, and view delegation without @InjectPresenter.
| name | ui-leanback |
| description | Trigger: TV UI & Media Clients. Implementing Leanback-compliant interfaces, handling D-pad focus, View Binding, and Glide image loading. |
Mandatory for all new UI and refactors. Replaces findViewById.
private lateinit var binding: ActivityExampleBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityExampleBinding.inflate(layoutInflater)
setContentView(binding.root)
}
private var _binding: FragmentExampleBinding? = null
private val binding get() = _binding!!
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
_binding = FragmentExampleBinding.inflate(inflater, container, false)
return binding.root
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
val progressBinding = IncludeLoadingProgressBinding.bind(binding.root)
Standard for all image loading and caching.
Glide.with(context)
.load(url)
.placeholder(R.drawable.default_video_still)
.error(R.drawable.default_error)
.into(binding.imageView)
MotionLayout is prohibited. Use XML animations in res/anim.
res/anim/fade_in.xml)<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="300" />
Non-negotiable for TV UI. Provide clear visual feedback.
view.setOnFocusChangeListener { v, hasFocus ->
if (hasFocus) {
v.animate().scaleX(1.1f).scaleY(1.1f).setDuration(200).start()
} else {
v.animate().scaleX(1.0f).scaleY(1.0f).setDuration(200).start()
}
}
Alternatively, use a drawable selector with a border or background change.