Write apps for Android TV devices using dpad-friendly widgets and template fragments.
Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
April 7, 2021 1.0.0 1.1.0-rc01 - -

Declaring dependencies

To add a dependency on Leanback, 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:


dependencies {
    def leanback_version = "1.0.0"

    implementation "androidx.leanback:leanback:$leanback_version"

    // leanback-preference is an add-on that provides a settings UI for TV apps.
    implementation "androidx.leanback:leanback-preference:$leanback_version"

    // leanback-paging is an add-on that simplifies adding paging support to a RecyclerView Adapter.
    implementation "androidx.leanback:leanback-paging:1.1.0-alpha07"

    // leanback-tab is an add-on that provides customized TabLayout to be used as the top navigation bar.
    implementation "androidx.leanback:leanback-tab:1.1.0-beta01"


dependencies {
    val leanback_version = "1.0.0"


    // leanback-preference is an add-on that provides a settings UI for TV apps.

    // leanback-paging is an add-on that simplifies adding paging support to a RecyclerView Adapter.

    // leanback-tab is an add-on that provides customized TabLayout to be used as the top navigation bar.

For more information about dependencies, see Add build dependencies.


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.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.1.0

Leanback Leanback-Preference Version 1.1.0-rc01

April 7, 2021

androidx.leanback:leanback:1.1.0-rc01 and androidx.leanback:leanback-preference:1.1.0-rc01 are released. Version 1.1.0-rc01 contains these commits.

Leanback-Paging Version 1.1.0-alpha07

January 13, 2021

androidx.leanback:leanback-paging:1.1.0-alpha07 is released. Version 1.1.0-alpha07 contains these commits.

API Changes

  • Updated the convenience properties, CombinedLoadStates.refresh, CombinedLoadStates.prepend, CombinedLoadStates.append to only transition from Loading to NotLoading after both mediator and source load states are NotLoading to ensure the remote update has been applied. (I65619)

Leanback Leanback-Preference Leanback-Tab Version 1.1.0-beta01

December 2, 2020

androidx.leanback:leanback:1.1.0-beta01, androidx.leanback:leanback-preference:1.1.0-beta01, and androidx.leanback:leanback-tab:1.1.0-beta01 are released. Version 1.1.0-beta01 contains these commits.

Bug Fixes

  • Fix view leak when pushing VerticalGridSupportFragment to backstack (Iaac69, b/171909417)
  • Fix view leak when pushing BrowseSupportFragment to backstack (I34483, b/171909417)
  • Fix view leak when pushing DetailsSupportFragment to backstack (Ifec9e, b/171909417)
  • Fix view leak when pushing RowsSupportFragment to backstack (I985d4, b/171909417)
  • Fix GuidedStepSupportFragment background transition animation. (I86d15, b/173647688)
  • Fix IllegalArgumentException when restoring GuidedStepSupportFragment (Ic829f, b/172000115)
  • Fix GridLayoutManager NullPointerException in findContainingItemView() when clearFocus() (Id0e42)

Leanback-Paging Version 1.1.0-alpha06

December 2, 2020

androidx.leanback:leanback-paging:1.1.0-alpha06 is released. Version 1.1.0-alpha06 contains these commits.

API Changes

  • dataRefreshFlow / dataRefreshListener APIs have been removed as they are redundant with loadStateFlow / Listener updates. For those migrating, the loadStateFlow equivalent is:

    loadStateFlow.distinctUntilChangedBy { it.refresh }
        .filter { it.refresh is NotLoading }

    (Ib5570, b/173530908)

  • Full deprecate dataRefreshFlow / Listener methods with a replaceWith clause. (I6e2dd)

Version 1.1.0-alpha05

October 1, 2020

androidx.leanback:leanback-*:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits.

New Features

  • Let A11Y navigation respect GridLayoutManager focusOutFront and focusOutEnd attributes. (b/161390258)

Bug Fixes

  • Fix View leak in GuidanceStylist.onDestroyView() (b/164841457)
  • Fix ConcatAdapter in GridLayoutManager (b/165694295)
  • leanback-tab: Javadoc improvements and minor code refactoring (aosp/1393383)
  • Remove setRecyclerView method from API which was added when same method was deprecated on RecyclerView. Update leanback lib to use RecyclerView's new addRecyclerListener API method. (I14798)

Version 1.1.0-alpha04

August 11, 2020

androidx.leanback:leanback:1.1.0-alpha04, androidx.leanback:leanback-paging:1.1.0-alpha04, androidx.leanback:leanback-preference:1.1.0-alpha04, and androidx.leanback:leanback-tab:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.

New Features

  • The LeanbackTabLayout provides the top navigation (typically displayed horizontally across the top of the app) in the browse experience.
  • Paging for Leanback simplifies adding paging support to a RecyclerView.Adapter.
  • Added appcompat themes for leanback that will simplify the creation of a single code base between mobile and TV.

API Changes

  • Added adapter based on asyncpagingdatadiffer for leanback widgets (If0dfe)
  • Adding a customized TabLayout to be used as the top navigation bar in leanback (I1e304)

Version 1.1.0-alpha03

December 18, 2019

androidx.leanback:leanback:1.1.0-alpha03 and androidx.leanback:leanback-preference:1.1.0-alpha03 are released. Leanback Version 1.1.0-alpha03 contains these commits and Leanback-Preference Version 1.1.0-alpha03 contains these commits.

New features

  • BaseGridView now supports custom scrolling speeds (aosp/952718)
  • Made guided step item touch more friendly (aosp/1167964)
  • Exposed the BaseGridView OnLayoutCompleteListener so apps can perform View transformations after the layout pass. (aosp/1164409)

API changes

  • Added a new API to allow custom BaseGridView scrolling speeds (aosp/952718)
  • Added a new API to add OnLayoutCompleteListener in BaseGridView (aosp/1164409)

Bug fixes

  • Fixed a bug where fast layout pass doesn’t update the alignment of a child. (aosp/1122745)
  • Fixed a stack overflow crash in the Picker widget when the focus is changing (aosp/1168473)

Dependency changes

  • Leanback-preference: pinned the dependency of androidx.preference to 1.1.0 (aosp/1181902)

Version 1.1.0-alpha02

May 7, 2019

androidx.leanback:leanback:1.1.0-alpha02 and androidx.leanback:leanback-preference:1.1.0-alpha02 are released. The commits included in this version can at leanback commits and leanback-preference commits.

New features

  • RowsSupportFragment is now allowed to share ViewHolders with other RowsSupportFragments, which would improve performance for a multiple-tab UI.

API changes

  • Added PlaybackSupportFragment.setShowOrHideControlsOverlayOnUserInteraction() to allow app disable auto hide/show playback controls when DPAD is pressed.

Bug fixes

  • Fixed broken leanback-preference Fragments theme due to a change in preference library.
  • Fix navigation bug when BACK key is pressed on SearchEditText

Version 1.1.0-alpha01

January 30, 2019

androidx.leanback:leanback 1.1.0-alpha01 is released.

New features

  • Added PinPicker widget.
  • Outline clipping is now disabled by default on low-ram device.
  • Allowed customized PlaybackSupportFragment showing/hiding controls behavior (b/122918400)

API changes

  • Framework fragments were deprecated.
  • New PinPicker class.

Bug fixes

  • Fixed a fragment transaction crash after BrowseSupportFragment is stopped
  • GuidedStepSupportFragment should not clip items in VerticalGridView (aosp/787396)
  • onCreateActionsStylist() and onCreateGuidanceStylist() were moved from constructor to GuidedSupportFragment.onCreate() (aosp/787397)
  • Fixed a bug where SearchSupportFragment failed to focus to results fragment. (aosp/798833)
  • Fixed a scrolling bug in VerticalGridView and HorizontalGridView (aosp/858809)

androidx.leanback-preference 1.1.0-alpha01 is released.

New features

  • Added androidx fragment classes, deprecated framework fragment classes.
  • Colors and fonts are now based on framework theme attributes.

API changes

  • New androidx fragment classes, framework fragment classes were deprecated.