tv
Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
---|---|---|---|---|
April 19, 2023 | - | - | - | 1.0.0-alpha06 |
Declaring dependencies
To add dependencies on tv-foundation and tv-material, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle
file for
your app or module:
Groovy
dependencies { implementation "androidx.tv:tv-foundation:1.0.0-alpha06" implementation "androidx.tv:tv-material:1.0.0-alpha06" }
Kotlin
dependencies { implementation("androidx.tv:tv-foundation:1.0.0-alpha06") implementation("androidx.tv:tv-material:1.0.0-alpha06") }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
There are no release notes for this artifact.
Version 1.0.0
Version 1.0.0-alpha06
April 19, 2023
androidx.tv:tv-foundation:1.0.0-alpha06
and androidx.tv:tv-material:1.0.0-alpha06
are released. Version 1.0.0-alpha06 contains these commits.
New Features
- Add Material 3 Card implementations optimized for TV.
- Add Material 3 Button implementations optimized for TV.
API Changes
- Renamed
CarouselSlide
andslideCount
inCarousel
toCarouselItem
anditemCount
. (Ie554c) - Renamed
forward
andbackward
ContentTransforms
toStartToEnd
andEndToStart
. (Ie554c)
Bug Fixes
- Handle back DPAD button when focused on
NavigationDrawer
. (d654f4)
Version 1.0.0-alpha05
March 22, 2023
androidx.tv:tv-foundation:1.0.0-alpha05
and androidx.tv:tv-material:1.0.0-alpha05
are released. Version 1.0.0-alpha05 contains these commits.
API Changes
- Introducing Side Navigation Drawer composable into
tv-material
. To learn how to use this composable, please refer to the samples. (I12c08) - Introduce Icon composable in TV Material 3 (I72db9)
- Introducing Surface composable to
tv-material
with indications such as Border, Glow and Scale, which can be used to build components that clearly highlight the focused element on the TV screen. (I4a6d8), (Iceea1), (Iee4d4), (I79edf), (Icb376) - Update
CarouselItem
toCarouselSlide
to match theslideCount
param name in 'Carousel' API (Ic4299)
Version 1.0.0-alpha04
February 8, 2023
androidx.tv:tv-foundation:1.0.0-alpha04
and androidx.tv:tv-material:1.0.0-alpha04
are released. Version 1.0.0-alpha04 contains these commits.
New Features
- In lazy rows, columns and grids, the pivot is overridden, if necessary, to ensure the entire item is brought into view. (11d7e40)
- Add customization of tab colors in different states. (21b2925)
- Carousel now accepts custom animations for forward and backward manual scrolling. (431494a)
API Changes
- Renaming
androidx.tv.material
toandroidx.tv.material3
and flattening package structure underandroidx.tv.material3
. (I6ca52) - Indicator within Carousel Indicator row is now a slot that can be customized by the developer. (268af2a)
- Renamed
focusableItem
toimmersiveListItem
. Users will have to manually addfocusable()
orclickable()
modifier along withimmersiveListItem
(5dd5078)(b/263061052) - Renamed
timeToDisplayMillis
toautoScrollDurationMillis
in Carousel component. (431494a) CarouselItem
is now restricted to use withinCarousel
's. (431494a)- Carousel now accepts
ContentTransforms
as the animation definition instead ofEnterTransition
andExitTransitions
. (431494a) - Introduced
PinnableContainer
api propagated by lazy lists via a composition local which allows to pin current item. (Ib8881, b/259274257, b/195049010) - Added
mainAxisItemSpacing
property toTvLazyListLayoutInfo
andTvLazyGridLayoutInfo
(I37765)
Bug Fixes
- Update tab-row to ensure it handles tab-count of 0 or 1 correctly. (I44009), (1c01525), (b/264018028)
- Fix focus-search crash when
TvLazyColumn
contains emptyTvLazyRow
. (e11b4fe), (b/260299091) - The
clickable
modifier now works withImmersiveList
. (5dd5078), (b/263061052) - Back key is now handled and used to exit Featured Carousel. (84c138c)
- Carousel does not lose focus on multiple fast key-presses. (799489f)
- Carousel does not lose focus on long key-presses. (b2cf37e)
- Addressed crashes when carousel slide-count changes. (b261247)
Version 1.0.0-alpha03
December 7, 2022
androidx.tv:tv-foundation:1.0.0-alpha03
and androidx.tv:tv-material:1.0.0-alpha03
are released. Version 1.0.0-alpha03 contains these commits.
New Features
TabRow
is now available as an experimental API allowing users to add top navigation bars to their apps. Generally, TV devices expect tabs to load when the tab-title is focused on in the tab-row.- TV specific indicators like underline indicator and pill indicator are offered out of the box. Sample usages can be found in tv-samples
Version 1.0.0-alpha02
November 9, 2022
androidx.tv:tv-foundation:1.0.0-alpha02
and androidx.tv:tv-material:1.0.0-alpha02
are released. Version 1.0.0-alpha02 contains these commits.
Bug Fixes
- Improved scrolling performance when scrolling through a collection of
TvLazyRows/TvLazyColumns
by reducing the focus search space.(I723a3)
Version 1.0.0-alpha01
October 5, 2022
androidx.tv:tv-foundation:1.0.0-alpha01
and androidx.tv:tv-material:1.0.0-alpha01
are released. Version 1.0.0-alpha01 contains these commits.
New Features
The first alpha contains early preview implementations of components for TV use cases, including:
- Adding modifier
scrollableWithPivot
to allow non-lazy scrolling containers such as Row, Column, Grid to have the scrolling container scroll the content so that the item-in-focus remains at the same position on the TV screen. - Adding composables
TvLazyRow
,TvLazyColumn
,TvLazyHorizontalGrid
,TvLazyVerticalGrid
to have the scrolling container scroll the content so that the item-in-focus remains at the same position on the TV screen. - Adding Featured Carousel composable for TV that allows the user to create an auto-scrolling banner carousel.
- Adding Immersive List composable for TV that allows the user to create an Immersive Row/Column/Grid that changes the background based on the list-item in focus.
Known issues
- When scrolling container gains focus, the first element does not gain focus by default.
- Focusing on a
TextField
does not always open the keyboard or can inhibit focus from moving to other fields. - Scrolling vertically in a
LazyColumn
containingLazyRows
has poor performance.