Leanback

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
December 18, 2019 1.0.0 - - 1.1.0-alpha03

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"
}

For more information about dependencies, see Add build dependencies.

Feedback

Your feedback helps make Jetpack better. Please 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

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.