使用 Leanback UI 工具包
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
使用 Compose 打造更優質的應用程式
使用 Android TV OS 版 Jetpack Compose,以最少的程式碼打造精美的 UI。
Leanback UI 工具包提供的類別可用於使用 androidx.leanback 程式庫建構使用者介面。這個程式庫提供使用 View 和 Fragment 的類別架構,以已淘汰的 Material 1 設計語言為基礎。
如要使用新型的宣告式 UI,請改用 Compose for TV 建構電視應用程式。
主題
- Leanback UI 工具包程式庫
- 開始使用已淘汰的 Leanback UI 工具包的 AndroidX 程式庫。
- 建立目錄瀏覽器
- 使用現已淘汰的 Leanback UI 工具包,為媒體目錄建立瀏覽介面。
- 提供資訊卡檢視模式
- 使用已淘汰的 Leanback UI 工具包,為內容項目建構資訊卡檢視畫面。
- 建立詳細資料檢視畫面
- 使用現已淘汰的 Leanback UI 工具包,為媒體項目建立詳細資料頁面。
- 新增傳輸控制項
- 使用已淘汰的 Leanback UI 工具包,為影片播放器建立傳輸控制項。
- 新增逐步指南
- 使用已淘汰的 Leanback UI 工具包,引導使用者做出一系列決定。
- 為初次接觸的使用者介紹您的應用程式
- 使用已淘汰的 Leanback UI 工具包,向初次使用者展示如何充分運用應用程式。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Using the Leanback UI toolkit\n\nBuild 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\n\nThe Leanback UI toolkit provides classes for building user interfaces with the\n[androidx.leanback library](/training/tv/get-started/create#leanback). The library provides a framework of classes using views and fragments\nbased 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\n**[Leanback UI toolkit libraries](/training/tv/playback/leanback/leanback-libraries)**\n: Get started with the AndroidX libraries for the now deprecated\n Leanback UI toolkit.\n\n**[Create a catalog browser](/training/tv/playback/leanback/browse)**\n: Use the now 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 now 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 now 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 now 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 now 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 now deprecated Leanback UI toolkit to show first-time users how\n to get the most out of your app."]]