AndroidX TV 库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
大多数 AndroidX 库都可以与 Android TV 搭配使用。使用 Android 架构组件,如 ViewModel
用于管理生命周期感知型界面数据,使用 Room
与本地 SQLite 数据库集成,与移动设备的集成相同。
使用 Compose 构建具有现代响应式界面的 Android TV 应用。与 ViewModel
结合使用,Compose 可让您在各种外形规格之间共享应用的大部分逻辑。
如需了解详情,请参阅在 Android TV 上使用 Jetpack Compose。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# AndroidX TV libraries\n\nMost AndroidX libraries can be used with Android TV. Use\n[Android architecture components](/topic/libraries/architecture), such as\n[`ViewModel`](/topic/libraries/architecture/viewmodel) for managing\nlifecycle-aware UI data and [`Room`](/jetpack/androidx/releases/room) to\nintegrate with local SQLite databases, just the same as you would for mobile.\n\nUse Compose to build Android TV apps with modern responsive UIs. Combined with\n`ViewModel`, Compose lets you to share the majority of your application's\nlogic between form factors.\n\nFor details, see\n[Use Jetpack Compose on Android TV](/training/tv/playback/compose)."]]