直接前往內容

最常造訪的網頁

最近瀏覽的網頁

navigation

android.support.v17.leanback

Support classes for building Leanback user experiences.

Many apps intended for a 10-foot, or 'Leanback', experience are centered around media and games. Games tend to have custom user interfaces, but media applications may benefit from a common set of user interface components that work well in a Leanback environment. Following is an overview of the Leanback Support Library.

Leanback provides a model-view-presenter approach to building applications:

  • The model is primarily provided by the application developer. Leanback imposes very few restrictions on how this model is implemented: anything extending Object in Java is supported.
  • The view is handled by the existing android.view package. Developers may continue to use their existing knowledge and experience to create visually compelling applications with Leanback.
  • The presenter is based on the existing Adapter concept in the Android framework, but has been updated to add more flexibility and composability. In particular, the interface for binding data to views has been separated from the adapter that traverses the data, allowing presenters to be used in more places. See Presenter for more details.

Leanback contains a mixture of higher level building blocks such as Fragments in the android.support.v17.leanback.app package. Notable examples are the BrowseSupportFragment, DetailsSupportFragment, PlaybackSupportFragment and the GuidedStepSupportFragment. Helper classes are also provided that work with the leanback fragments, for example the PlaybackTransportControlGlue and PlaybackSupportFragmentGlueHost.

Many lower level building blocks are also provided in the android.support.v17.leanback.widget package. These allow applications to easily incorporate Leanback look and feel while allowing for a high degree of customization. Primary examples include the UI widget HorizontalGridView and VerticalGridView.

Classes

R  
R.anim  
R.animator  
R.attr  
R.bool  
R.color  
R.dimen  
R.drawable  
R.fraction  
R.id  
R.integer  
R.layout  
R.raw  
R.string  
R.style  
R.styleable  
R.transition  
本網站使用 Cookie 儲存你在此指定的語言和顯示選項偏好設定。

掌握有關 Android 開發人員的最新消息和實用訣竅,協助你製作最受歡迎的 Google Play 內容。

* 必填欄位

訂閱成功!

在 WeChat 上追蹤 Google Developers

你要以瀏覽這個網站嗎?

你要求以顯示這個網頁,但你為此網站指定的語言偏好設定為

是否要變更語言偏好設定並改用瀏覽網站?稍後如要變更語言偏好設定,請利用位在每個網頁最下方的語言選單來調整設定。

你的 API 層級必須達 以上才能存取這個級別

本說明文件已隱藏,因為你為該文件選取的 API 層級為 。使用左側導覽列上方的選取工具即可變更說明文件的 API 層級。

如需進一步瞭解如何為應用程式指定 API 層級的相關資訊,請參閱 Supporting Different Platform Versions (支援不同的平台版本) (英文)。

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)