使用 Leanback 界面工具包
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 Compose 打造更优质的应用
使用 Jetpack Compose for Android TV OS,以最少的代码创建精美的界面。
已弃用的 Leanback 界面工具包提供了一些类,用于使用 androidx.leanback 库构建界面。该库提供了一个类框架,该框架使用基于已弃用的 Material 1 设计语言的视图和 fragment。
如需使用新式声明性界面,请改用 Compose for TV 来构建电视应用。
主题
- Leanback 界面工具包库
- 开始使用已弃用的 Leanback 界面工具包的 AndroidX 库。
- 创建目录浏览器
- 使用已弃用的 Leanback 界面工具包构建媒体目录的浏览界面。
- 提供卡片视图
- 使用已弃用的 Leanback 界面工具包构建内容项目的卡片视图。
- 构建详情视图
- 使用已弃用的 Leanback 界面工具包构建媒体项目的详情页面。
- 添加传输控件
- 使用已弃用的 Leanback 界面工具包为视频播放器构建传输控件。
- 添加引导步骤
- 使用已弃用的 Leanback 界面工具包引导用户作出一系列决定。
- 向初次使用的用户介绍您的应用
- 使用已弃用的 Leanback 界面工具包向初次使用的用户展示如何充分利用您的应用。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-09-06。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-06。"],[],[],null,["Build better with Compose \nCreate beautiful UIs with minimal code using Jetpack Compose for Android TV OS. \n[Compose for TV →](/training/tv/playback/compose) \n| **Warning:** The Leanback library is deprecated. Use [Jetpack Compose for\n| Android TV OS](/training/tv/playback/compose) instead.\n\n\nThe deprecated Leanback UI toolkit provides classes for building user\ninterfaces with the [androidx.leanback library](/training/tv/get-started/create#leanback). The library provides a framework of classes using\nviews and fragments based on the deprecated Material 1 design language.\n\n\nFor a modern, declarative UI, use [Compose for TV](../compose) to build\nyour TV apps instead.\n\nTopics\n\n**[Leanback UI toolkit libraries](/training/tv/playback/leanback/leanback-libraries)**\n: Get started with the AndroidX libraries for the deprecated\n Leanback UI toolkit.\n\n**[Create a catalog browser](/training/tv/playback/leanback/browse)**\n: Use the deprecated Leanback UI toolkit to build a browsing\n interface for media catalogs.\n\n**[Provide a card view](/training/tv/playback/leanback/card)**\n: Use the deprecated Leanback UI toolkit to build a card view for\n content items.\n\n**[Build a details view](/training/tv/playback/leanback/details)**\n: Use the deprecated Leanback UI toolkit to build a details page for\n media items.\n\n**[Add transport controls](/training/tv/playback/leanback/transport-controls)**\n: Use the deprecated Leanback UI toolkit to build transport controls\n for your video player.\n\n**[Add a guided step](/training/tv/playback/leanback/guided-step)**\n: Use the deprecated Leanback UI toolkit to guide a user through a\n series of decisions.\n\n**[Introduce first-time users to your app](/training/tv/playback/leanback/onboarding)**\n: Use the deprecated Leanback UI toolkit to show first-time users how\n to get the most out of your app."]]